Commit e71da1fd authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Jiri Kosina

HID: intel-ish-hid: Make remove callback return void

The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct ishtp_cl_driver::remove() return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error value is a bad idea.
Signed-off-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 7c746603
...@@ -1015,7 +1015,7 @@ static int loader_ishtp_cl_probe(struct ishtp_cl_device *cl_device) ...@@ -1015,7 +1015,7 @@ static int loader_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
* *
* Return: 0 * Return: 0
*/ */
static int loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device) static void loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
{ {
struct ishtp_cl_data *client_data; struct ishtp_cl_data *client_data;
struct ishtp_cl *loader_ishtp_cl = ishtp_get_drvdata(cl_device); struct ishtp_cl *loader_ishtp_cl = ishtp_get_drvdata(cl_device);
...@@ -1032,8 +1032,6 @@ static int loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device) ...@@ -1032,8 +1032,6 @@ static int loader_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
cancel_work_sync(&client_data->work_ishtp_reset); cancel_work_sync(&client_data->work_ishtp_reset);
loader_deinit(loader_ishtp_cl); loader_deinit(loader_ishtp_cl);
ishtp_put_device(cl_device); ishtp_put_device(cl_device);
return 0;
} }
/** /**
......
...@@ -838,7 +838,7 @@ static int hid_ishtp_cl_probe(struct ishtp_cl_device *cl_device) ...@@ -838,7 +838,7 @@ static int hid_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
* *
* Return: 0 * Return: 0
*/ */
static int hid_ishtp_cl_remove(struct ishtp_cl_device *cl_device) static void hid_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
{ {
struct ishtp_cl *hid_ishtp_cl = ishtp_get_drvdata(cl_device); struct ishtp_cl *hid_ishtp_cl = ishtp_get_drvdata(cl_device);
struct ishtp_cl_data *client_data = ishtp_get_client_data(hid_ishtp_cl); struct ishtp_cl_data *client_data = ishtp_get_client_data(hid_ishtp_cl);
...@@ -856,8 +856,6 @@ static int hid_ishtp_cl_remove(struct ishtp_cl_device *cl_device) ...@@ -856,8 +856,6 @@ static int hid_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
hid_ishtp_cl = NULL; hid_ishtp_cl = NULL;
client_data->num_hid_devices = 0; client_data->num_hid_devices = 0;
return 0;
} }
/** /**
......
...@@ -258,7 +258,6 @@ static int ishtp_cl_device_remove(struct device *dev) ...@@ -258,7 +258,6 @@ static int ishtp_cl_device_remove(struct device *dev)
{ {
struct ishtp_cl_device *device = to_ishtp_cl_device(dev); struct ishtp_cl_device *device = to_ishtp_cl_device(dev);
struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver); struct ishtp_cl_driver *driver = to_ishtp_cl_driver(dev->driver);
int ret = 0;
if (device->event_cb) { if (device->event_cb) {
device->event_cb = NULL; device->event_cb = NULL;
...@@ -266,9 +265,9 @@ static int ishtp_cl_device_remove(struct device *dev) ...@@ -266,9 +265,9 @@ static int ishtp_cl_device_remove(struct device *dev)
} }
if (driver->remove) if (driver->remove)
ret = driver->remove(device); driver->remove(device);
return ret; return 0;
} }
/** /**
......
...@@ -703,7 +703,7 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device) ...@@ -703,7 +703,7 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)
* *
* Return: 0 * Return: 0
*/ */
static int cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device) static void cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
{ {
struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device); struct ishtp_cl *cros_ish_cl = ishtp_get_drvdata(cl_device);
struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl); struct ishtp_cl_data *client_data = ishtp_get_client_data(cros_ish_cl);
...@@ -712,8 +712,6 @@ static int cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device) ...@@ -712,8 +712,6 @@ static int cros_ec_ishtp_remove(struct ishtp_cl_device *cl_device)
cancel_work_sync(&client_data->work_ec_evt); cancel_work_sync(&client_data->work_ec_evt);
cros_ish_deinit(cros_ish_cl); cros_ish_deinit(cros_ish_cl);
ishtp_put_device(cl_device); ishtp_put_device(cl_device);
return 0;
} }
/** /**
......
...@@ -36,7 +36,7 @@ struct ishtp_cl_driver { ...@@ -36,7 +36,7 @@ struct ishtp_cl_driver {
const char *name; const char *name;
const guid_t *guid; const guid_t *guid;
int (*probe)(struct ishtp_cl_device *dev); int (*probe)(struct ishtp_cl_device *dev);
int (*remove)(struct ishtp_cl_device *dev); void (*remove)(struct ishtp_cl_device *dev);
int (*reset)(struct ishtp_cl_device *dev); int (*reset)(struct ishtp_cl_device *dev);
const struct dev_pm_ops *pm; const struct dev_pm_ops *pm;
}; };
......
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