Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 0170f616f496 ("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>

authored by

Vadim Pasternak and committed by
Hans de Goede
8e3938cf af8a6d28

+1 -2
+1 -2
drivers/platform/x86/mlx-platform.c
··· 6238 6238 if (priv->pdev_mux[i]) 6239 6239 platform_device_unregister(priv->pdev_mux[i]); 6240 6240 } 6241 - 6242 - mlxplat_post_exit(); 6243 6241 } 6244 6242 6245 6243 static int mlxplat_i2c_main_complition_notify(void *handle, int id) ··· 6367 6369 pm_power_off = NULL; 6368 6370 mlxplat_pre_exit(priv); 6369 6371 mlxplat_i2c_main_exit(priv); 6372 + mlxplat_post_exit(); 6370 6373 } 6371 6374 module_exit(mlxplat_exit); 6372 6375