mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
platform/x86: Switch back to struct platform_driver::remove()
After commit 0edb555a65d1 ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/platform/x86/ to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. While touching these files, make indention of the struct initializer consistent in several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241017073802.53235-2-u.kleine-koenig@baylibre.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
7dd1233931
commit
3ea5eb68b9
@ -2636,7 +2636,7 @@ static struct platform_driver acer_platform_driver = {
|
||||
.pm = &acer_pm,
|
||||
},
|
||||
.probe = acer_platform_probe,
|
||||
.remove_new = acer_platform_remove,
|
||||
.remove = acer_platform_remove,
|
||||
.shutdown = acer_platform_shutdown,
|
||||
};
|
||||
|
||||
|
@ -110,7 +110,7 @@ static struct platform_driver adv_swbutton_driver = {
|
||||
.acpi_match_table = button_device_ids,
|
||||
},
|
||||
.probe = adv_swbutton_probe,
|
||||
.remove_new = adv_swbutton_remove,
|
||||
.remove = adv_swbutton_remove,
|
||||
};
|
||||
module_platform_driver(adv_swbutton_driver);
|
||||
|
||||
|
@ -883,7 +883,7 @@ static void hsmp_pltdrv_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver amd_hsmp_driver = {
|
||||
.probe = hsmp_pltdrv_probe,
|
||||
.remove_new = hsmp_pltdrv_remove,
|
||||
.remove = hsmp_pltdrv_remove,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.acpi_match_table = amd_hsmp_acpi_ids,
|
||||
|
@ -1156,7 +1156,7 @@ static struct platform_driver amd_pmc_driver = {
|
||||
.pm = pm_sleep_ptr(&amd_pmc_pm),
|
||||
},
|
||||
.probe = amd_pmc_probe,
|
||||
.remove_new = amd_pmc_remove,
|
||||
.remove = amd_pmc_remove,
|
||||
};
|
||||
module_platform_driver(amd_pmc_driver);
|
||||
|
||||
|
@ -496,7 +496,7 @@ static struct platform_driver amd_pmf_driver = {
|
||||
.pm = pm_sleep_ptr(&amd_pmf_pm),
|
||||
},
|
||||
.probe = amd_pmf_probe,
|
||||
.remove_new = amd_pmf_remove,
|
||||
.remove = amd_pmf_remove,
|
||||
};
|
||||
module_platform_driver(amd_pmf_driver);
|
||||
|
||||
|
@ -132,10 +132,10 @@ static void amilo_rfkill_remove(struct platform_device *device)
|
||||
|
||||
static struct platform_driver amilo_rfkill_driver = {
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
.probe = amilo_rfkill_probe,
|
||||
.remove_new = amilo_rfkill_remove,
|
||||
.probe = amilo_rfkill_probe,
|
||||
.remove = amilo_rfkill_remove,
|
||||
};
|
||||
|
||||
static int __init amilo_rfkill_init(void)
|
||||
|
@ -5066,7 +5066,7 @@ int __init_or_module asus_wmi_register_driver(struct asus_wmi_driver *driver)
|
||||
return -EBUSY;
|
||||
|
||||
platform_driver = &driver->platform_driver;
|
||||
platform_driver->remove_new = asus_wmi_remove;
|
||||
platform_driver->remove = asus_wmi_remove;
|
||||
platform_driver->driver.owner = driver->owner;
|
||||
platform_driver->driver.name = driver->name;
|
||||
platform_driver->driver.pm = &asus_pm_ops;
|
||||
|
@ -385,7 +385,7 @@ static struct platform_driver p50_gpio_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
},
|
||||
.probe = p50_gpio_probe,
|
||||
.remove_new = p50_gpio_remove,
|
||||
.remove = p50_gpio_remove,
|
||||
};
|
||||
|
||||
/* Board setup */
|
||||
|
@ -1023,8 +1023,8 @@ static struct platform_driver compal_driver = {
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
},
|
||||
.probe = compal_probe,
|
||||
.remove_new = compal_remove,
|
||||
.probe = compal_probe,
|
||||
.remove = compal_remove,
|
||||
};
|
||||
|
||||
static int __init compal_init(void)
|
||||
|
@ -709,7 +709,7 @@ static struct platform_driver dcdbas_driver = {
|
||||
.name = DRIVER_NAME,
|
||||
},
|
||||
.probe = dcdbas_probe,
|
||||
.remove_new = dcdbas_remove,
|
||||
.remove = dcdbas_remove,
|
||||
};
|
||||
|
||||
static const struct platform_device_info dcdbas_dev_info __initconst = {
|
||||
|
@ -179,7 +179,7 @@ MODULE_DEVICE_TABLE(acpi, smo8800_ids);
|
||||
|
||||
static struct platform_driver smo8800_driver = {
|
||||
.probe = smo8800_probe,
|
||||
.remove_new = smo8800_remove,
|
||||
.remove = smo8800_remove,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.acpi_match_table = smo8800_ids,
|
||||
|
@ -393,7 +393,7 @@ static void dell_uart_bl_pdev_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver dell_uart_bl_pdev_driver = {
|
||||
.probe = dell_uart_bl_pdev_probe,
|
||||
.remove_new = dell_uart_bl_pdev_remove,
|
||||
.remove = dell_uart_bl_pdev_remove,
|
||||
.driver = {
|
||||
.name = "dell-uart-backlight",
|
||||
},
|
||||
|
@ -1748,7 +1748,7 @@ static struct platform_driver hp_wmi_driver __refdata = {
|
||||
.pm = &hp_wmi_pm_ops,
|
||||
.dev_groups = hp_wmi_groups,
|
||||
},
|
||||
.remove_new = __exit_p(hp_wmi_bios_remove),
|
||||
.remove = __exit_p(hp_wmi_bios_remove),
|
||||
};
|
||||
|
||||
static umode_t hp_wmi_hwmon_is_visible(const void *data,
|
||||
|
@ -372,7 +372,7 @@ static SIMPLE_DEV_PM_OPS(hp_accel_pm, lis3lv02d_suspend, lis3lv02d_resume);
|
||||
/* For the HP MDPS aka 3D Driveguard */
|
||||
static struct platform_driver lis3lv02d_driver = {
|
||||
.probe = lis3lv02d_probe,
|
||||
.remove_new = lis3lv02d_remove,
|
||||
.remove = lis3lv02d_remove,
|
||||
.driver = {
|
||||
.name = "hp_accel",
|
||||
.pm = &hp_accel_pm,
|
||||
|
@ -221,7 +221,7 @@ static struct platform_driver tc1100_driver = {
|
||||
.pm = &tc1100_pm_ops,
|
||||
#endif
|
||||
},
|
||||
.remove_new = tc1100_remove,
|
||||
.remove = tc1100_remove,
|
||||
};
|
||||
|
||||
static int __init tc1100_init(void)
|
||||
|
@ -842,7 +842,7 @@ static struct platform_driver huawei_wmi_driver = {
|
||||
.name = "huawei-wmi",
|
||||
},
|
||||
.probe = huawei_wmi_probe,
|
||||
.remove_new = huawei_wmi_remove,
|
||||
.remove = huawei_wmi_remove,
|
||||
};
|
||||
|
||||
static __init int huawei_wmi_init(void)
|
||||
|
@ -2306,7 +2306,7 @@ MODULE_DEVICE_TABLE(acpi, ideapad_device_ids);
|
||||
|
||||
static struct platform_driver ideapad_acpi_driver = {
|
||||
.probe = ideapad_acpi_add,
|
||||
.remove_new = ideapad_acpi_remove,
|
||||
.remove = ideapad_acpi_remove,
|
||||
.driver = {
|
||||
.name = "ideapad_acpi",
|
||||
.pm = &ideapad_pm,
|
||||
|
@ -131,7 +131,7 @@ MODULE_DEVICE_TABLE(platform, bxt_wcove_tmu_id_table);
|
||||
|
||||
static struct platform_driver bxt_wcove_tmu_driver = {
|
||||
.probe = bxt_wcove_tmu_probe,
|
||||
.remove_new = bxt_wcove_tmu_remove,
|
||||
.remove = bxt_wcove_tmu_remove,
|
||||
.driver = {
|
||||
.name = "bxt_wcove_tmu",
|
||||
.pm = &bxtwc_tmu_pm_ops,
|
||||
|
@ -167,7 +167,7 @@ static void crc_pwrsrc_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver crc_pwrsrc_driver = {
|
||||
.probe = crc_pwrsrc_probe,
|
||||
.remove_new = crc_pwrsrc_remove,
|
||||
.remove = crc_pwrsrc_remove,
|
||||
.driver = {
|
||||
.name = "crystal_cove_pwrsrc",
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ static struct platform_driver chtdc_ti_pwrbtn_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
.probe = chtdc_ti_pwrbtn_probe,
|
||||
.remove_new = chtdc_ti_pwrbtn_remove,
|
||||
.remove = chtdc_ti_pwrbtn_remove,
|
||||
.id_table = chtdc_ti_pwrbtn_id_table,
|
||||
};
|
||||
module_platform_driver(chtdc_ti_pwrbtn_driver);
|
||||
|
@ -427,7 +427,7 @@ static struct platform_driver cht_int33fe_typec_driver = {
|
||||
.acpi_match_table = ACPI_PTR(cht_int33fe_acpi_ids),
|
||||
},
|
||||
.probe = cht_int33fe_typec_probe,
|
||||
.remove_new = cht_int33fe_typec_remove,
|
||||
.remove = cht_int33fe_typec_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(cht_int33fe_typec_driver);
|
||||
|
@ -747,7 +747,7 @@ static struct platform_driver intel_hid_pl_driver = {
|
||||
.pm = &intel_hid_pl_pm_ops,
|
||||
},
|
||||
.probe = intel_hid_probe,
|
||||
.remove_new = intel_hid_remove,
|
||||
.remove = intel_hid_remove,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -266,13 +266,13 @@ static const struct acpi_device_id int0002_acpi_ids[] = {
|
||||
MODULE_DEVICE_TABLE(acpi, int0002_acpi_ids);
|
||||
|
||||
static struct platform_driver int0002_driver = {
|
||||
.driver = {
|
||||
.driver = {
|
||||
.name = DRV_NAME,
|
||||
.acpi_match_table = int0002_acpi_ids,
|
||||
.pm = &int0002_pm_ops,
|
||||
},
|
||||
.probe = int0002_probe,
|
||||
.remove_new = int0002_remove,
|
||||
.remove = int0002_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(int0002_driver);
|
||||
|
@ -308,7 +308,7 @@ static void sar_remove(struct platform_device *device)
|
||||
|
||||
static struct platform_driver sar_driver = {
|
||||
.probe = sar_probe,
|
||||
.remove_new = sar_remove,
|
||||
.remove = sar_remove,
|
||||
.driver = {
|
||||
.name = DRVNAME,
|
||||
.acpi_match_table = ACPI_PTR(sar_device_ids)
|
||||
|
@ -392,7 +392,7 @@ static struct platform_driver int3472_discrete = {
|
||||
.acpi_match_table = int3472_device_id,
|
||||
},
|
||||
.probe = skl_int3472_discrete_probe,
|
||||
.remove_new = skl_int3472_discrete_remove,
|
||||
.remove = skl_int3472_discrete_remove,
|
||||
};
|
||||
module_platform_driver(int3472_discrete);
|
||||
|
||||
|
@ -97,7 +97,7 @@ static struct platform_driver mrfld_pwrbtn_driver = {
|
||||
.name = "mrfld_bcove_pwrbtn",
|
||||
},
|
||||
.probe = mrfld_pwrbtn_probe,
|
||||
.remove_new = mrfld_pwrbtn_remove,
|
||||
.remove = mrfld_pwrbtn_remove,
|
||||
.id_table = mrfld_pwrbtn_id_table,
|
||||
};
|
||||
module_platform_driver(mrfld_pwrbtn_driver);
|
||||
|
@ -1722,7 +1722,7 @@ static struct platform_driver pmc_core_driver = {
|
||||
.dev_groups = pmc_dev_groups,
|
||||
},
|
||||
.probe = pmc_core_probe,
|
||||
.remove_new = pmc_core_remove,
|
||||
.remove = pmc_core_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(pmc_core_driver);
|
||||
|
@ -1163,7 +1163,7 @@ static void telemetry_pltdrv_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver telemetry_soc_driver = {
|
||||
.probe = telemetry_pltdrv_probe,
|
||||
.remove_new = telemetry_pltdrv_remove,
|
||||
.remove = telemetry_pltdrv_remove,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
},
|
||||
|
@ -387,7 +387,7 @@ static struct platform_driver intel_vbtn_pl_driver = {
|
||||
.pm = &intel_vbtn_pm_ops,
|
||||
},
|
||||
.probe = intel_vbtn_probe,
|
||||
.remove_new = intel_vbtn_remove,
|
||||
.remove = intel_vbtn_remove,
|
||||
};
|
||||
|
||||
static acpi_status __init
|
||||
|
@ -298,7 +298,7 @@ static void yt2_1380_fc_pdev_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver yt2_1380_fc_pdev_driver = {
|
||||
.probe = yt2_1380_fc_pdev_probe,
|
||||
.remove_new = yt2_1380_fc_pdev_remove,
|
||||
.remove = yt2_1380_fc_pdev_remove,
|
||||
.driver = {
|
||||
.name = YT2_1380_FC_PDEV_NAME,
|
||||
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
|
||||
|
@ -536,7 +536,7 @@ static void yogabook_pdev_remove(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver yogabook_pdev_driver = {
|
||||
.probe = yogabook_pdev_probe,
|
||||
.remove_new = yogabook_pdev_remove,
|
||||
.remove = yogabook_pdev_remove,
|
||||
.driver = {
|
||||
.name = YB_PDEV_NAME,
|
||||
.pm = pm_sleep_ptr(&yogabook_pm_ops),
|
||||
|
@ -6633,7 +6633,7 @@ static struct platform_driver mlxplat_driver = {
|
||||
.probe_type = PROBE_FORCE_SYNCHRONOUS,
|
||||
},
|
||||
.probe = mlxplat_probe,
|
||||
.remove_new = mlxplat_remove,
|
||||
.remove = mlxplat_remove,
|
||||
};
|
||||
|
||||
static int __init mlxplat_init(void)
|
||||
|
@ -78,7 +78,7 @@ static struct platform_driver samsungq10_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
.probe = samsungq10_probe,
|
||||
.remove_new = samsungq10_remove,
|
||||
.remove = samsungq10_remove,
|
||||
};
|
||||
|
||||
static struct platform_device *samsungq10_device;
|
||||
|
@ -235,7 +235,7 @@ MODULE_DEVICE_TABLE(acpi, sel3350_device_ids);
|
||||
|
||||
static struct platform_driver sel3350_platform_driver = {
|
||||
.probe = sel3350_probe,
|
||||
.remove_new = sel3350_remove,
|
||||
.remove = sel3350_remove,
|
||||
.driver = {
|
||||
.name = "sel3350-platform",
|
||||
.acpi_match_table = sel3350_device_ids,
|
||||
|
@ -409,7 +409,7 @@ static struct platform_driver smi_driver = {
|
||||
.acpi_match_table = smi_acpi_ids,
|
||||
},
|
||||
.probe = smi_probe,
|
||||
.remove_new = smi_remove,
|
||||
.remove = smi_remove,
|
||||
};
|
||||
module_platform_driver(smi_driver);
|
||||
|
||||
|
@ -37,7 +37,7 @@ static int simatic_ipc_batt_apollolake_probe(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver simatic_ipc_batt_driver = {
|
||||
.probe = simatic_ipc_batt_apollolake_probe,
|
||||
.remove_new = simatic_ipc_batt_apollolake_remove,
|
||||
.remove = simatic_ipc_batt_apollolake_remove,
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
|
@ -37,7 +37,7 @@ static int simatic_ipc_batt_elkhartlake_probe(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver simatic_ipc_batt_driver = {
|
||||
.probe = simatic_ipc_batt_elkhartlake_probe,
|
||||
.remove_new = simatic_ipc_batt_elkhartlake_remove,
|
||||
.remove = simatic_ipc_batt_elkhartlake_remove,
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
|
@ -73,7 +73,7 @@ static int simatic_ipc_batt_f7188x_probe(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver simatic_ipc_batt_driver = {
|
||||
.probe = simatic_ipc_batt_f7188x_probe,
|
||||
.remove_new = simatic_ipc_batt_f7188x_remove,
|
||||
.remove = simatic_ipc_batt_f7188x_remove,
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
|
@ -239,7 +239,7 @@ static int simatic_ipc_batt_io_probe(struct platform_device *pdev)
|
||||
|
||||
static struct platform_driver simatic_ipc_batt_driver = {
|
||||
.probe = simatic_ipc_batt_io_probe,
|
||||
.remove_new = simatic_ipc_batt_io_remove,
|
||||
.remove = simatic_ipc_batt_io_remove,
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
|
@ -1328,7 +1328,7 @@ static struct platform_driver acpi_wmi_driver = {
|
||||
.acpi_match_table = wmi_device_ids,
|
||||
},
|
||||
.probe = acpi_wmi_probe,
|
||||
.remove_new = acpi_wmi_remove,
|
||||
.remove = acpi_wmi_remove,
|
||||
};
|
||||
|
||||
static int __init acpi_wmi_init(void)
|
||||
|
@ -456,7 +456,7 @@ static struct platform_driver x86_android_tablet_driver = {
|
||||
.driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
},
|
||||
.remove_new = x86_android_tablet_remove,
|
||||
.remove = x86_android_tablet_remove,
|
||||
};
|
||||
|
||||
static int __init x86_android_tablet_init(void)
|
||||
|
@ -68,7 +68,7 @@ static struct platform_driver xo1_rfkill_driver = {
|
||||
.name = "xo1-rfkill",
|
||||
},
|
||||
.probe = xo1_rfkill_probe,
|
||||
.remove_new = xo1_rfkill_remove,
|
||||
.remove = xo1_rfkill_remove,
|
||||
};
|
||||
|
||||
module_platform_driver(xo1_rfkill_driver);
|
||||
|
Loading…
x
Reference in New Issue
Block a user