Commit ffff77dd authored by Jiri Kosina's avatar Jiri Kosina

Merge branch 'for-6.10/plarform-driver-remove-new' into for-linus

- conversion of HID device drivers from platform_driver->remove() to
  platform_driver->remove_new() (Uwe Kleine-König)
parents d5cf3978 009faf97
...@@ -255,7 +255,7 @@ static int cbas_ec_probe(struct platform_device *pdev) ...@@ -255,7 +255,7 @@ static int cbas_ec_probe(struct platform_device *pdev)
return retval; return retval;
} }
static int cbas_ec_remove(struct platform_device *pdev) static void cbas_ec_remove(struct platform_device *pdev)
{ {
struct cros_ec_device *ec = dev_get_drvdata(pdev->dev.parent); struct cros_ec_device *ec = dev_get_drvdata(pdev->dev.parent);
...@@ -266,7 +266,6 @@ static int cbas_ec_remove(struct platform_device *pdev) ...@@ -266,7 +266,6 @@ static int cbas_ec_remove(struct platform_device *pdev)
cbas_ec_set_input(NULL); cbas_ec_set_input(NULL);
mutex_unlock(&cbas_ec_reglock); mutex_unlock(&cbas_ec_reglock);
return 0;
} }
static const struct acpi_device_id cbas_ec_acpi_ids[] = { static const struct acpi_device_id cbas_ec_acpi_ids[] = {
...@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(of, cbas_ec_of_match); ...@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(of, cbas_ec_of_match);
static struct platform_driver cbas_ec_driver = { static struct platform_driver cbas_ec_driver = {
.probe = cbas_ec_probe, .probe = cbas_ec_probe,
.remove = cbas_ec_remove, .remove_new = cbas_ec_remove,
.driver = { .driver = {
.name = "cbas_ec", .name = "cbas_ec",
.acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids), .acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids),
......
...@@ -1031,14 +1031,14 @@ static int hid_sensor_custom_probe(struct platform_device *pdev) ...@@ -1031,14 +1031,14 @@ static int hid_sensor_custom_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int hid_sensor_custom_remove(struct platform_device *pdev) static void hid_sensor_custom_remove(struct platform_device *pdev)
{ {
struct hid_sensor_custom *sensor_inst = platform_get_drvdata(pdev); struct hid_sensor_custom *sensor_inst = platform_get_drvdata(pdev);
struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
if (sensor_inst->custom_pdev) { if (sensor_inst->custom_pdev) {
platform_device_unregister(sensor_inst->custom_pdev); platform_device_unregister(sensor_inst->custom_pdev);
return 0; return;
} }
hid_sensor_custom_dev_if_remove(sensor_inst); hid_sensor_custom_dev_if_remove(sensor_inst);
...@@ -1046,8 +1046,6 @@ static int hid_sensor_custom_remove(struct platform_device *pdev) ...@@ -1046,8 +1046,6 @@ static int hid_sensor_custom_remove(struct platform_device *pdev)
sysfs_remove_group(&sensor_inst->pdev->dev.kobj, sysfs_remove_group(&sensor_inst->pdev->dev.kobj,
&enable_sensor_attr_group); &enable_sensor_attr_group);
sensor_hub_remove_callback(hsdev, hsdev->usage); sensor_hub_remove_callback(hsdev, hsdev->usage);
return 0;
} }
static const struct platform_device_id hid_sensor_custom_ids[] = { static const struct platform_device_id hid_sensor_custom_ids[] = {
...@@ -1067,7 +1065,7 @@ static struct platform_driver hid_sensor_custom_platform_driver = { ...@@ -1067,7 +1065,7 @@ static struct platform_driver hid_sensor_custom_platform_driver = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
}, },
.probe = hid_sensor_custom_probe, .probe = hid_sensor_custom_probe,
.remove = hid_sensor_custom_remove, .remove_new = hid_sensor_custom_remove,
}; };
module_platform_driver(hid_sensor_custom_platform_driver); module_platform_driver(hid_sensor_custom_platform_driver);
......
...@@ -271,10 +271,9 @@ static int surface_kbd_probe(struct platform_device *pdev) ...@@ -271,10 +271,9 @@ static int surface_kbd_probe(struct platform_device *pdev)
return surface_hid_device_add(shid); return surface_hid_device_add(shid);
} }
static int surface_kbd_remove(struct platform_device *pdev) static void surface_kbd_remove(struct platform_device *pdev)
{ {
surface_hid_device_destroy(platform_get_drvdata(pdev)); surface_hid_device_destroy(platform_get_drvdata(pdev));
return 0;
} }
static const struct acpi_device_id surface_kbd_match[] = { static const struct acpi_device_id surface_kbd_match[] = {
...@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(acpi, surface_kbd_match); ...@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(acpi, surface_kbd_match);
static struct platform_driver surface_kbd_driver = { static struct platform_driver surface_kbd_driver = {
.probe = surface_kbd_probe, .probe = surface_kbd_probe,
.remove = surface_kbd_remove, .remove_new = surface_kbd_remove,
.driver = { .driver = {
.name = "surface_keyboard", .name = "surface_keyboard",
.acpi_match_table = surface_kbd_match, .acpi_match_table = surface_kbd_match,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment