diff options
author | Vadim Pasternak <vadimp@nvidia.com> | 2023-08-22 11:34:49 +0000 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-08-23 17:31:30 +0200 |
commit | 01a4cce89288f927bd6a01efb20e2d366deb6732 (patch) | |
tree | f3027e2ff9b1e6172b5f72f57ee202fb08b4a104 /drivers/platform | |
parent | 02daa222fbdd6afe52c25e5c2894d53946a4260d (diff) | |
download | linux-01a4cce89288f927bd6a01efb20e2d366deb6732.tar.gz linux-01a4cce89288f927bd6a01efb20e2d366deb6732.tar.bz2 linux-01a4cce89288f927bd6a01efb20e2d366deb6732.zip |
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/mellanox/mlxreg-hotplug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c index 6ddfea0d4c5b..eb5ad35274dd 100644 --- a/drivers/platform/mellanox/mlxreg-hotplug.c +++ b/drivers/platform/mellanox/mlxreg-hotplug.c @@ -112,7 +112,7 @@ static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv, * Return if adapter number is negative. It could be in case hotplug * event is not associated with hotplug device. */ - if (data->hpdev.nr < 0) + if (data->hpdev.nr < 0 && data->hpdev.action != MLXREG_HOTPLUG_DEVICE_NO_ACTION) return 0; pdata = dev_get_platdata(&priv->pdev->dev); |