Loading drivers/platform/x86/mlx-platform.c +15 −14 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ struct mlxplat_priv { }; static struct platform_device *mlxplat_dev; static int mlxplat_i2c_main_complition_notify(void *handle, int id); static int mlxplat_i2c_main_completion_notify(void *handle, int id); static void __iomem *i2c_bridge_addr, *jtag_bridge_addr; /* Regions for LPC I2C controller and LPC base register space */ Loading @@ -384,7 +384,7 @@ static const struct resource mlxplat_lpc_resources[] = { /* Platform systems default i2c data */ static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_default_data = { .completion_notify = mlxplat_i2c_main_complition_notify, .completion_notify = mlxplat_i2c_main_completion_notify, }; /* Platform i2c next generation systems data */ Loading @@ -409,7 +409,7 @@ static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_ng_data = { .mask = MLXPLAT_CPLD_AGGR_MASK_COMEX, .cell_low = MLXPLAT_CPLD_LPC_REG_AGGRCO_OFFSET, .mask_low = MLXPLAT_CPLD_LOW_AGGR_MASK_I2C, .completion_notify = mlxplat_i2c_main_complition_notify, .completion_notify = mlxplat_i2c_main_completion_notify, }; /* Platform default channels */ Loading Loading @@ -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; Loading @@ -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(); Loading @@ -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; Loading Loading @@ -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; Loading @@ -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) Loading Loading @@ -6471,7 +6471,7 @@ static void mlxplat_i2c_mux_topology_exit(struct mlxplat_priv *priv) } } static int mlxplat_i2c_main_complition_notify(void *handle, int id) static int mlxplat_i2c_main_completion_notify(void *handle, int id) { struct mlxplat_priv *priv = handle; Loading Loading @@ -6514,6 +6514,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv) return 0; fail_mlxplat_i2c_mux_topology_init: platform_device_unregister(priv->pdev_i2c); fail_platform_i2c_register: fail_mlxplat_mlxcpld_verify_bus_topology: return err; Loading @@ -6521,6 +6522,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv) static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv) { mlxplat_platdevs_exit(priv); mlxplat_i2c_mux_topology_exit(priv); if (priv->pdev_i2c) platform_device_unregister(priv->pdev_i2c); Loading @@ -6542,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; Loading Loading @@ -6597,11 +6599,11 @@ static int mlxplat_probe(struct platform_device *pdev) fail_register_reboot_notifier: fail_regcache_sync: mlxplat_pre_exit(priv); mlxplat_i2c_main_exit(priv); fail_mlxplat_i2c_main_init: fail_regmap_write: fail_alloc: mlxplat_post_exit(); mlxplat_logicdev_exit(); return err; } Loading @@ -6614,9 +6616,8 @@ static void mlxplat_remove(struct platform_device *pdev) pm_power_off = NULL; if (mlxplat_reboot_nb) unregister_reboot_notifier(mlxplat_reboot_nb); mlxplat_pre_exit(priv); mlxplat_i2c_main_exit(priv); mlxplat_post_exit(); mlxplat_logicdev_exit(); } static const struct acpi_device_id mlxplat_acpi_table[] = { Loading Loading
drivers/platform/x86/mlx-platform.c +15 −14 Original line number Diff line number Diff line Loading @@ -368,7 +368,7 @@ struct mlxplat_priv { }; static struct platform_device *mlxplat_dev; static int mlxplat_i2c_main_complition_notify(void *handle, int id); static int mlxplat_i2c_main_completion_notify(void *handle, int id); static void __iomem *i2c_bridge_addr, *jtag_bridge_addr; /* Regions for LPC I2C controller and LPC base register space */ Loading @@ -384,7 +384,7 @@ static const struct resource mlxplat_lpc_resources[] = { /* Platform systems default i2c data */ static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_default_data = { .completion_notify = mlxplat_i2c_main_complition_notify, .completion_notify = mlxplat_i2c_main_completion_notify, }; /* Platform i2c next generation systems data */ Loading @@ -409,7 +409,7 @@ static struct mlxreg_core_hotplug_platform_data mlxplat_mlxcpld_i2c_ng_data = { .mask = MLXPLAT_CPLD_AGGR_MASK_COMEX, .cell_low = MLXPLAT_CPLD_LPC_REG_AGGRCO_OFFSET, .mask_low = MLXPLAT_CPLD_LOW_AGGR_MASK_I2C, .completion_notify = mlxplat_i2c_main_complition_notify, .completion_notify = mlxplat_i2c_main_completion_notify, }; /* Platform default channels */ Loading Loading @@ -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; Loading @@ -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(); Loading @@ -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; Loading Loading @@ -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; Loading @@ -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) Loading Loading @@ -6471,7 +6471,7 @@ static void mlxplat_i2c_mux_topology_exit(struct mlxplat_priv *priv) } } static int mlxplat_i2c_main_complition_notify(void *handle, int id) static int mlxplat_i2c_main_completion_notify(void *handle, int id) { struct mlxplat_priv *priv = handle; Loading Loading @@ -6514,6 +6514,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv) return 0; fail_mlxplat_i2c_mux_topology_init: platform_device_unregister(priv->pdev_i2c); fail_platform_i2c_register: fail_mlxplat_mlxcpld_verify_bus_topology: return err; Loading @@ -6521,6 +6522,7 @@ static int mlxplat_i2c_main_init(struct mlxplat_priv *priv) static void mlxplat_i2c_main_exit(struct mlxplat_priv *priv) { mlxplat_platdevs_exit(priv); mlxplat_i2c_mux_topology_exit(priv); if (priv->pdev_i2c) platform_device_unregister(priv->pdev_i2c); Loading @@ -6542,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; Loading Loading @@ -6597,11 +6599,11 @@ static int mlxplat_probe(struct platform_device *pdev) fail_register_reboot_notifier: fail_regcache_sync: mlxplat_pre_exit(priv); mlxplat_i2c_main_exit(priv); fail_mlxplat_i2c_main_init: fail_regmap_write: fail_alloc: mlxplat_post_exit(); mlxplat_logicdev_exit(); return err; } Loading @@ -6614,9 +6616,8 @@ static void mlxplat_remove(struct platform_device *pdev) pm_power_off = NULL; if (mlxplat_reboot_nb) unregister_reboot_notifier(mlxplat_reboot_nb); mlxplat_pre_exit(priv); mlxplat_i2c_main_exit(priv); mlxplat_post_exit(); mlxplat_logicdev_exit(); } static const struct acpi_device_id mlxplat_acpi_table[] = { Loading