@@ -368,7 +368,7 @@ struct mlxplat_priv {
368368};
369369
370370static struct platform_device * mlxplat_dev ;
371- static int mlxplat_i2c_main_complition_notify (void * handle , int id );
371+ static int mlxplat_i2c_main_completion_notify (void * handle , int id );
372372static void __iomem * i2c_bridge_addr , * jtag_bridge_addr ;
373373
374374/* Regions for LPC I2C controller and LPC base register space */
@@ -384,7 +384,7 @@ static const struct resource mlxplat_lpc_resources[] = {
384384
385385/* Platform systems default i2c data */
386386static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_default_data = {
387- .completion_notify = mlxplat_i2c_main_complition_notify ,
387+ .completion_notify = mlxplat_i2c_main_completion_notify ,
388388};
389389
390390/* Platform i2c next generation systems data */
@@ -409,7 +409,7 @@ static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_ng_data = {
409409 .mask = MLXPLAT_CPLD_AGGR_MASK_COMEX ,
410410 .cell_low = MLXPLAT_CPLD_LPC_REG_AGGRCO_OFFSET ,
411411 .mask_low = MLXPLAT_CPLD_LOW_AGGR_MASK_I2C ,
412- .completion_notify = mlxplat_i2c_main_complition_notify ,
412+ .completion_notify = mlxplat_i2c_main_completion_notify ,
413413};
414414
415415/* Platform default channels */
@@ -6291,7 +6291,7 @@ static void mlxplat_pci_fpga_devices_exit(void)
62916291}
62926292
62936293static 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
64356435static int mlxplat_i2c_mux_topology_init (struct mlxplat_priv * priv )
@@ -6471,7 +6471,7 @@ static void mlxplat_i2c_mux_topology_exit(struct mlxplat_priv *priv)
64716471 }
64726472}
64736473
6474- static int mlxplat_i2c_main_complition_notify (void * handle , int id )
6474+ static int mlxplat_i2c_main_completion_notify (void * handle , int id )
64756475{
64766476 struct mlxplat_priv * priv = handle ;
64776477
@@ -6514,13 +6514,15 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv)
65146514 return 0 ;
65156515
65166516fail_mlxplat_i2c_mux_topology_init :
6517+ platform_device_unregister (priv -> pdev_i2c );
65176518fail_platform_i2c_register :
65186519fail_mlxplat_mlxcpld_verify_bus_topology :
65196520 return err ;
65206521}
65216522
65226523static void mlxplat_i2c_main_exit (struct mlxplat_priv * priv )
65236524{
6525+ mlxplat_platdevs_exit (priv );
65246526 mlxplat_i2c_mux_topology_exit (priv );
65256527 if (priv -> pdev_i2c )
65266528 platform_device_unregister (priv -> pdev_i2c );
@@ -6542,7 +6544,7 @@ static int mlxplat_probe(struct platform_device *pdev)
65426544 mlxplat_dev = pdev ;
65436545 }
65446546
6545- err = mlxplat_pre_init (& hotplug_resources , & hotplug_resources_size );
6547+ err = mlxplat_logicdev_init (& hotplug_resources , & hotplug_resources_size );
65466548 if (err )
65476549 return err ;
65486550
@@ -6597,11 +6599,11 @@ static int mlxplat_probe(struct platform_device *pdev)
65976599
65986600fail_register_reboot_notifier :
65996601fail_regcache_sync :
6600- mlxplat_pre_exit (priv );
6602+ mlxplat_i2c_main_exit (priv );
66016603fail_mlxplat_i2c_main_init :
66026604fail_regmap_write :
66036605fail_alloc :
6604- mlxplat_post_exit ();
6606+ mlxplat_logicdev_exit ();
66056607
66066608 return err ;
66076609}
@@ -6614,9 +6616,8 @@ static void mlxplat_remove(struct platform_device *pdev)
66146616 pm_power_off = NULL ;
66156617 if (mlxplat_reboot_nb )
66166618 unregister_reboot_notifier (mlxplat_reboot_nb );
6617- mlxplat_pre_exit (priv );
66186619 mlxplat_i2c_main_exit (priv );
6619- mlxplat_post_exit ();
6620+ mlxplat_logicdev_exit ();
66206621}
66216622
66226623static const struct acpi_device_id mlxplat_acpi_table [] = {
0 commit comments