Skip to content

Commit

Permalink
platform: mellanox: Fix order in exit flow
Browse files Browse the repository at this point in the history
commit 8e3938c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
vadimp-nvidia authored and gregkh committed Aug 16, 2023
1 parent 26cca33 commit cada3f1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/platform/x86/mlx-platform.c
Expand Up @@ -6238,8 +6238,6 @@ static void mlxplat_i2c_mux_topolgy_exit(struct mlxplat_priv *priv)
if (priv->pdev_mux[i])
platform_device_unregister(priv->pdev_mux[i]);
}

mlxplat_post_exit();
}

static int mlxplat_i2c_main_complition_notify(void *handle, int id)
Expand Down Expand Up @@ -6369,6 +6367,7 @@ static void __exit mlxplat_exit(void)
pm_power_off = NULL;
mlxplat_pre_exit(priv);
mlxplat_i2c_main_exit(priv);
mlxplat_post_exit();
}
module_exit(mlxplat_exit);

Expand Down

0 comments on commit cada3f1

Please sign in to comment.