Skip to content

Commit 01a4cce

Browse files
vadimp-nvidiajwrdegoede
authored andcommitted
platform: mellanox: mlxreg-hotplug: Extend condition for notification callback processing
Allow processing of notification callback in routine mlxreg_hotplug_device_create() in case hotplug object is configured with action "MLXREG_HOTPLUG_DEVICE_NO_ACTION" in case no I2C parent bus is specified. Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reviewed-by: Michael Shych <michaelsh@nvidia.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230822113451.13785-15-vadimp@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 02daa22 commit 01a4cce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/mellanox/mlxreg-hotplug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
112112
* Return if adapter number is negative. It could be in case hotplug
113113
* event is not associated with hotplug device.
114114
*/
115-
if (data->hpdev.nr < 0)
115+
if (data->hpdev.nr < 0 && data->hpdev.action != MLXREG_HOTPLUG_DEVICE_NO_ACTION)
116116
return 0;
117117

118118
pdata = dev_get_platdata(&priv->pdev->dev);

0 commit comments

Comments
 (0)