diff options
author | Jiri Kosina <jkosina@suse.com> | 2024-05-14 13:55:14 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2024-05-14 13:55:14 +0200 |
commit | ffff77dd1e1de3122e09811481f643e8ad171a39 (patch) | |
tree | b99a298f63df00da58075c3b0eb9f32d2cdb0c77 /drivers/hid/hid-sensor-custom.c | |
parent | Merge branch 'for-6.10/nintendo' into for-linus (diff) | |
parent | HID: surface-hid: kbd: Convert to platform remove callback returning void (diff) | |
download | linux-ffff77dd1e1de3122e09811481f643e8ad171a39.tar.xz linux-ffff77dd1e1de3122e09811481f643e8ad171a39.zip |
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)
Diffstat (limited to 'drivers/hid/hid-sensor-custom.c')
-rw-r--r-- | drivers/hid/hid-sensor-custom.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c index ac214777d7d9..bd400f6b472b 100644 --- a/drivers/hid/hid-sensor-custom.c +++ b/drivers/hid/hid-sensor-custom.c @@ -1031,14 +1031,14 @@ err_remove_callback: 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_hub_device *hsdev = pdev->dev.platform_data; if (sensor_inst->custom_pdev) { platform_device_unregister(sensor_inst->custom_pdev); - return 0; + return; } hid_sensor_custom_dev_if_remove(sensor_inst); @@ -1046,8 +1046,6 @@ static int hid_sensor_custom_remove(struct platform_device *pdev) sysfs_remove_group(&sensor_inst->pdev->dev.kobj, &enable_sensor_attr_group); sensor_hub_remove_callback(hsdev, hsdev->usage); - - return 0; } static const struct platform_device_id hid_sensor_custom_ids[] = { @@ -1067,7 +1065,7 @@ static struct platform_driver hid_sensor_custom_platform_driver = { .name = KBUILD_MODNAME, }, .probe = hid_sensor_custom_probe, - .remove = hid_sensor_custom_remove, + .remove_new = hid_sensor_custom_remove, }; module_platform_driver(hid_sensor_custom_platform_driver); |