[PATCH platform 3/3] platform: mellanox: Rename some init()/exit() functions for consistent naming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently some names of init()/exit() pairing function are not
consistent.

Rename pair mlxplat_pre_init()/mlxplat_post_exit() to respectively
mlxplat_logicdev_init()/mlxplat_logicdev_exit().

Rename pair mlxplat_post_init()/mlxplat_pre_exit() to respectively
mlxplat_platdevs_init()/mlxplat_platdevs_exit().

Signed-off-by: Vadim Pasternak <vadimp@xxxxxxxxxx>
---
 drivers/platform/x86/mlx-platform.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 5b4e57c37f2c..1bad4c64f36c 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -6291,7 +6291,7 @@ static void mlxplat_pci_fpga_devices_exit(void)
 }
 
 static int
-mlxplat_pre_init(struct resource **hotplug_resources, unsigned int *hotplug_resources_size)
+mlxplat_logicdev_init(struct resource **hotplug_resources, unsigned int *hotplug_resources_size)
 {
 	int err;
 
@@ -6302,7 +6302,7 @@ mlxplat_pre_init(struct resource **hotplug_resources, unsigned int *hotplug_reso
 	return err;
 }
 
-static void mlxplat_post_exit(void)
+static void mlxplat_logicdev_exit(void)
 {
 	if (lpc_bridge)
 		mlxplat_pci_fpga_devices_exit();
@@ -6310,7 +6310,7 @@ static void mlxplat_post_exit(void)
 		mlxplat_lpc_cpld_device_exit();
 }
 
-static int mlxplat_post_init(struct mlxplat_priv *priv)
+static int mlxplat_platdevs_init(struct mlxplat_priv *priv)
 {
 	int i = 0, err;
 
@@ -6407,7 +6407,7 @@ static int mlxplat_post_init(struct mlxplat_priv *priv)
 	return err;
 }
 
-static void mlxplat_pre_exit(struct mlxplat_priv *priv)
+static void mlxplat_platdevs_exit(struct mlxplat_priv *priv)
 {
 	int i;
 
@@ -6429,7 +6429,7 @@ mlxplat_i2c_mux_complition_notify(void *handle, struct i2c_adapter *parent,
 {
 	struct mlxplat_priv *priv = handle;
 
-	return mlxplat_post_init(priv);
+	return mlxplat_platdevs_init(priv);
 }
 
 static int mlxplat_i2c_mux_topology_init(struct mlxplat_priv *priv)
@@ -6522,7 +6522,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv)
 
 static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv)
 {
-	mlxplat_pre_exit(priv);
+	mlxplat_platdevs_exit(priv);
 	mlxplat_i2c_mux_topology_exit(priv);
 	if (priv->pdev_i2c)
 		platform_device_unregister(priv->pdev_i2c);
@@ -6544,7 +6544,7 @@ static int mlxplat_probe(struct platform_device *pdev)
 		mlxplat_dev = pdev;
 	}
 
-	err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
+	err = mlxplat_logicdev_init(&hotplug_resources, &hotplug_resources_size);
 	if (err)
 		return err;
 
@@ -6603,7 +6603,7 @@ static int mlxplat_probe(struct platform_device *pdev)
 fail_mlxplat_i2c_main_init:
 fail_regmap_write:
 fail_alloc:
-	mlxplat_post_exit();
+	mlxplat_logicdev_exit();
 
 	return err;
 }
@@ -6617,7 +6617,7 @@ static int mlxplat_remove(struct platform_device *pdev)
 	if (mlxplat_reboot_nb)
 		unregister_reboot_notifier(mlxplat_reboot_nb);
 	mlxplat_i2c_main_exit(priv);
-	mlxplat_post_exit();
+	mlxplat_logicdev_exit();
 	return 0;
 }
 
-- 
2.20.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux