summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorVadim Pasternak <vadimp@nvidia.com>2023-10-05 09:56:16 +0200
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-10-06 16:40:15 +0200
commitb26bcdd5f03e0b9fdd5dd8567b620538c5058c54 (patch)
tree09cb765a394bd020061703355a3e63d28ceafabb /drivers/platform
parentplatform: mellanox: Fix a resource leak in an error handling path in probing ... (diff)
downloadlinux-b26bcdd5f03e0b9fdd5dd8567b620538c5058c54.tar.xz
linux-b26bcdd5f03e0b9fdd5dd8567b620538c5058c54.zip
platform: mellanox: Rename some init()/exit() functions for consistent naming
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@nvidia.com> Link: https://lore.kernel.org/r/20231005075616.42777-4-vadimp@nvidia.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/mlx-platform.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index a2ffe4157df1..b9c709d7dbe0 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 @@ fail_platform_hotplug_register:
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 @@ fail_mlxplat_mlxcpld_verify_bus_topology:
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 @@ fail_regcache_sync:
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;
}