Skip to content

Commit ffff77d

Browse files
author
Jiri Kosina
committed
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)
2 parents d5cf397 + 009faf9 commit ffff77d

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

drivers/hid/hid-google-hammer.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static int cbas_ec_probe(struct platform_device *pdev)
255255
return retval;
256256
}
257257

258-
static int cbas_ec_remove(struct platform_device *pdev)
258+
static void cbas_ec_remove(struct platform_device *pdev)
259259
{
260260
struct cros_ec_device *ec = dev_get_drvdata(pdev->dev.parent);
261261

@@ -266,7 +266,6 @@ static int cbas_ec_remove(struct platform_device *pdev)
266266
cbas_ec_set_input(NULL);
267267

268268
mutex_unlock(&cbas_ec_reglock);
269-
return 0;
270269
}
271270

272271
static const struct acpi_device_id cbas_ec_acpi_ids[] = {
@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(of, cbas_ec_of_match);
285284

286285
static struct platform_driver cbas_ec_driver = {
287286
.probe = cbas_ec_probe,
288-
.remove = cbas_ec_remove,
287+
.remove_new = cbas_ec_remove,
289288
.driver = {
290289
.name = "cbas_ec",
291290
.acpi_match_table = ACPI_PTR(cbas_ec_acpi_ids),

drivers/hid/hid-sensor-custom.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,23 +1031,21 @@ static int hid_sensor_custom_probe(struct platform_device *pdev)
10311031
return ret;
10321032
}
10331033

1034-
static int hid_sensor_custom_remove(struct platform_device *pdev)
1034+
static void hid_sensor_custom_remove(struct platform_device *pdev)
10351035
{
10361036
struct hid_sensor_custom *sensor_inst = platform_get_drvdata(pdev);
10371037
struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data;
10381038

10391039
if (sensor_inst->custom_pdev) {
10401040
platform_device_unregister(sensor_inst->custom_pdev);
1041-
return 0;
1041+
return;
10421042
}
10431043

10441044
hid_sensor_custom_dev_if_remove(sensor_inst);
10451045
hid_sensor_custom_remove_attributes(sensor_inst);
10461046
sysfs_remove_group(&sensor_inst->pdev->dev.kobj,
10471047
&enable_sensor_attr_group);
10481048
sensor_hub_remove_callback(hsdev, hsdev->usage);
1049-
1050-
return 0;
10511049
}
10521050

10531051
static const struct platform_device_id hid_sensor_custom_ids[] = {
@@ -1067,7 +1065,7 @@ static struct platform_driver hid_sensor_custom_platform_driver = {
10671065
.name = KBUILD_MODNAME,
10681066
},
10691067
.probe = hid_sensor_custom_probe,
1070-
.remove = hid_sensor_custom_remove,
1068+
.remove_new = hid_sensor_custom_remove,
10711069
};
10721070
module_platform_driver(hid_sensor_custom_platform_driver);
10731071

drivers/hid/surface-hid/surface_kbd.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,10 +271,9 @@ static int surface_kbd_probe(struct platform_device *pdev)
271271
return surface_hid_device_add(shid);
272272
}
273273

274-
static int surface_kbd_remove(struct platform_device *pdev)
274+
static void surface_kbd_remove(struct platform_device *pdev)
275275
{
276276
surface_hid_device_destroy(platform_get_drvdata(pdev));
277-
return 0;
278277
}
279278

280279
static const struct acpi_device_id surface_kbd_match[] = {
@@ -285,7 +284,7 @@ MODULE_DEVICE_TABLE(acpi, surface_kbd_match);
285284

286285
static struct platform_driver surface_kbd_driver = {
287286
.probe = surface_kbd_probe,
288-
.remove = surface_kbd_remove,
287+
.remove_new = surface_kbd_remove,
289288
.driver = {
290289
.name = "surface_keyboard",
291290
.acpi_match_table = surface_kbd_match,

0 commit comments

Comments
 (0)