Skip to content

Commit 8e3938c

Browse files
vadimp-nvidiajwrdegoede
authored andcommitted
platform: mellanox: Fix order in exit flow
Fix exit flow order: call mlxplat_post_exit() after mlxplat_i2c_main_exit() in order to unregister main i2c driver before to "mlxplat" driver. Fixes: 0170f61 ("platform: mellanox: Split initialization procedure") Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Reviewed-by: Michael Shych <michaelsh@nvidia.com> Link: https://lore.kernel.org/r/20230813083735.39090-2-vadimp@nvidia.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent af8a6d2 commit 8e3938c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6238,8 +6238,6 @@ static void mlxplat_i2c_mux_topolgy_exit(struct mlxplat_priv *priv)
62386238
if (priv->pdev_mux[i])
62396239
platform_device_unregister(priv->pdev_mux[i]);
62406240
}
6241-
6242-
mlxplat_post_exit();
62436241
}
62446242

62456243
static int mlxplat_i2c_main_complition_notify(void *handle, int id)
@@ -6369,6 +6367,7 @@ static void __exit mlxplat_exit(void)
63696367
pm_power_off = NULL;
63706368
mlxplat_pre_exit(priv);
63716369
mlxplat_i2c_main_exit(priv);
6370+
mlxplat_post_exit();
63726371
}
63736372
module_exit(mlxplat_exit);
63746373

0 commit comments

Comments
 (0)