summaryrefslogtreecommitdiffstats
path: root/drivers/platform/mellanox
diff options
context:
space:
mode:
authorVadim Pasternak <vadimp@mellanox.com>2018-01-22 18:43:27 -0800
committerDarren Hart (VMware) <dvhart@infradead.org>2018-01-31 10:36:49 -0800
commit3d838f5514ca5318f46bdb5b3f997cee66091695 (patch)
tree50c4992eec82a92c48212f161ce3eae17de5e57a /drivers/platform/mellanox
parent4abdbfa7331ef5a79a6f89d2d8061ac085878756 (diff)
downloadlinux-3d838f5514ca5318f46bdb5b3f997cee66091695.tar.bz2
platform/mellanox: Rename i2c bus to nr
Use Linux convention of nr instead of bus for i2c adapter number. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> [dvhart: refactored commit into smaller functional changes] Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform/mellanox')
-rw-r--r--drivers/platform/mellanox/mlxreg-hotplug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
index e55f57639cc1..752f756723e0 100644
--- a/drivers/platform/mellanox/mlxreg-hotplug.c
+++ b/drivers/platform/mellanox/mlxreg-hotplug.c
@@ -186,17 +186,17 @@ static int mlxreg_hotplug_attr_init(struct mlxreg_hotplug_priv_data *priv)
static int mlxreg_hotplug_device_create(struct device *dev,
struct mlxreg_hotplug_device *item)
{
- item->adapter = i2c_get_adapter(item->bus);
+ item->adapter = i2c_get_adapter(item->nr);
if (!item->adapter) {
dev_err(dev, "Failed to get adapter for bus %d\n",
- item->bus);
+ item->nr);
return -EFAULT;
}
item->client = i2c_new_device(item->adapter, &item->brdinfo);
if (!item->client) {
dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
- item->brdinfo.type, item->bus, item->brdinfo.addr);
+ item->brdinfo.type, item->nr, item->brdinfo.addr);
i2c_put_adapter(item->adapter);
item->adapter = NULL;
return -EFAULT;