Skip to content

Commit b26bcdd

Browse files
vadimp-nvidiaij-intel
authored andcommitted
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>
1 parent 7ec4cd3 commit b26bcdd

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

drivers/platform/x86/mlx-platform.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6291,7 +6291,7 @@ static void mlxplat_pci_fpga_devices_exit(void)
62916291
}
62926292

62936293
static int
6294-
mlxplat_pre_init(struct resource **hotplug_resources, unsigned int *hotplug_resources_size)
6294+
mlxplat_logicdev_init(struct resource **hotplug_resources, unsigned int *hotplug_resources_size)
62956295
{
62966296
int err;
62976297

@@ -6302,15 +6302,15 @@ mlxplat_pre_init(struct resource **hotplug_resources, unsigned int *hotplug_reso
63026302
return err;
63036303
}
63046304

6305-
static void mlxplat_post_exit(void)
6305+
static void mlxplat_logicdev_exit(void)
63066306
{
63076307
if (lpc_bridge)
63086308
mlxplat_pci_fpga_devices_exit();
63096309
else
63106310
mlxplat_lpc_cpld_device_exit();
63116311
}
63126312

6313-
static int mlxplat_post_init(struct mlxplat_priv *priv)
6313+
static int mlxplat_platdevs_init(struct mlxplat_priv *priv)
63146314
{
63156315
int i = 0, err;
63166316

@@ -6407,7 +6407,7 @@ static int mlxplat_post_init(struct mlxplat_priv *priv)
64076407
return err;
64086408
}
64096409

6410-
static void mlxplat_pre_exit(struct mlxplat_priv *priv)
6410+
static void mlxplat_platdevs_exit(struct mlxplat_priv *priv)
64116411
{
64126412
int i;
64136413

@@ -6429,7 +6429,7 @@ mlxplat_i2c_mux_complition_notify(void *handle, struct i2c_adapter *parent,
64296429
{
64306430
struct mlxplat_priv *priv = handle;
64316431

6432-
return mlxplat_post_init(priv);
6432+
return mlxplat_platdevs_init(priv);
64336433
}
64346434

64356435
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)
65226522

65236523
static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv)
65246524
{
6525-
mlxplat_pre_exit(priv);
6525+
mlxplat_platdevs_exit(priv);
65266526
mlxplat_i2c_mux_topology_exit(priv);
65276527
if (priv->pdev_i2c)
65286528
platform_device_unregister(priv->pdev_i2c);
@@ -6544,7 +6544,7 @@ static int mlxplat_probe(struct platform_device *pdev)
65446544
mlxplat_dev = pdev;
65456545
}
65466546

6547-
err = mlxplat_pre_init(&hotplug_resources, &hotplug_resources_size);
6547+
err = mlxplat_logicdev_init(&hotplug_resources, &hotplug_resources_size);
65486548
if (err)
65496549
return err;
65506550

@@ -6603,7 +6603,7 @@ static int mlxplat_probe(struct platform_device *pdev)
66036603
fail_mlxplat_i2c_main_init:
66046604
fail_regmap_write:
66056605
fail_alloc:
6606-
mlxplat_post_exit();
6606+
mlxplat_logicdev_exit();
66076607

66086608
return err;
66096609
}
@@ -6617,7 +6617,7 @@ static int mlxplat_remove(struct platform_device *pdev)
66176617
if (mlxplat_reboot_nb)
66186618
unregister_reboot_notifier(mlxplat_reboot_nb);
66196619
mlxplat_i2c_main_exit(priv);
6620-
mlxplat_post_exit();
6620+
mlxplat_logicdev_exit();
66216621
return 0;
66226622
}
66236623

0 commit comments

Comments
 (0)