diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-03-01 17:04:04 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-03-08 11:33:39 +0100 |
commit | 2b329f5694aec86107931584413c7d2ebc6b548d (patch) | |
tree | bef3934baddef03a5a3775f7bd4aaf9915b36b6c /include/linux/wmi.h | |
parent | 2478907572fdd7cf285720f16513e956b3528854 (diff) |
platform/x86: wmi: Make remove callback return void
The driver core ignores the return value of struct bus_type::remove()
(and so wmi_dev_remove()) because there is only little that can be done.
To simplify the quest to make this function return void, let struct
wmi_driver::remove() return void, too. All implementers of this callback
return 0 already and this way it should be obvious to driver authors
that returning an error code is a bad idea.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20210301160404.1677064-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'include/linux/wmi.h')
-rw-r--r-- | include/linux/wmi.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/wmi.h b/include/linux/wmi.h index 8ef7e7faea1e..2cb3913c1f50 100644 --- a/include/linux/wmi.h +++ b/include/linux/wmi.h @@ -37,7 +37,7 @@ struct wmi_driver { const struct wmi_device_id *id_table; int (*probe)(struct wmi_device *wdev, const void *context); - int (*remove)(struct wmi_device *wdev); + void (*remove)(struct wmi_device *wdev); void (*notify)(struct wmi_device *device, union acpi_object *data); long (*filter_callback)(struct wmi_device *wdev, unsigned int cmd, struct wmi_ioctl_buffer *arg); |