Skip to content

Commit f709e1b

Browse files
mellanoxbmcdvhart
authored andcommitted
platform/mellanox: mlxreg-hotplug: Change input for device create routine
Change the first input parameter in mlxreg_hotplug_device_create to the pointer to mlxreg_hotplug private data in order to use the fields from the private data structure. Signed-off-by: Vadim Pasternak <[email protected]> [dvhart: Cleaned up commit message] Signed-off-by: Darren Hart (VMware) <[email protected]>
1 parent d726f6b commit f709e1b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/platform/mellanox/mlxreg-hotplug.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct mlxreg_hotplug_priv_data {
9393
bool after_probe;
9494
};
9595

96-
static int mlxreg_hotplug_device_create(struct device *dev,
96+
static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
9797
struct mlxreg_core_data *data)
9898
{
9999
/*
@@ -105,15 +105,15 @@ static int mlxreg_hotplug_device_create(struct device *dev,
105105

106106
data->hpdev.adapter = i2c_get_adapter(data->hpdev.nr);
107107
if (!data->hpdev.adapter) {
108-
dev_err(dev, "Failed to get adapter for bus %d\n",
108+
dev_err(priv->dev, "Failed to get adapter for bus %d\n",
109109
data->hpdev.nr);
110110
return -EFAULT;
111111
}
112112

113113
data->hpdev.client = i2c_new_device(data->hpdev.adapter,
114114
data->hpdev.brdinfo);
115115
if (!data->hpdev.client) {
116-
dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
116+
dev_err(priv->dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
117117
data->hpdev.brdinfo->type, data->hpdev.nr,
118118
data->hpdev.brdinfo->addr);
119119

@@ -270,10 +270,10 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
270270
if (item->inversed)
271271
mlxreg_hotplug_device_destroy(data);
272272
else
273-
mlxreg_hotplug_device_create(priv->dev, data);
273+
mlxreg_hotplug_device_create(priv, data);
274274
} else {
275275
if (item->inversed)
276-
mlxreg_hotplug_device_create(priv->dev, data);
276+
mlxreg_hotplug_device_create(priv, data);
277277
else
278278
mlxreg_hotplug_device_destroy(data);
279279
}
@@ -319,7 +319,7 @@ mlxreg_hotplug_health_work_helper(struct mlxreg_hotplug_priv_data *priv,
319319
if (regval == MLXREG_HOTPLUG_HEALTH_MASK) {
320320
if ((data->health_cntr++ == MLXREG_HOTPLUG_RST_CNTR) ||
321321
!priv->after_probe) {
322-
mlxreg_hotplug_device_create(priv->dev, data);
322+
mlxreg_hotplug_device_create(priv, data);
323323
data->attached = true;
324324
}
325325
} else {

0 commit comments

Comments
 (0)