@@ -80,7 +80,6 @@ struct rmi_function_handler {
int (*probe)(struct rmi_function *fn);
void (*remove)(struct rmi_function *fn);
int (*config)(struct rmi_function *fn);
- int (*reset)(struct rmi_function *fn);
irqreturn_t (*attention)(int irq, void *ctx);
int (*suspend)(struct rmi_function *fn);
int (*resume)(struct rmi_function *fn);
@@ -57,25 +57,6 @@ void rmi_free_function_list(struct rmi_device *rmi_dev)
data->f34_container = NULL;
}
-static int reset_one_function(struct rmi_function *fn)
-{
- struct rmi_function_handler *fh;
- int retval = 0;
-
- if (!fn || !fn->dev.driver)
- return 0;
-
- fh = to_rmi_function_handler(fn->dev.driver);
- if (fh->reset) {
- retval = fh->reset(fn);
- if (retval < 0)
- dev_err(&fn->dev, "Reset failed with code %d.\n",
- retval);
- }
-
- return retval;
-}
-
static int configure_one_function(struct rmi_function *fn)
{
struct rmi_function_handler *fh;
@@ -95,21 +76,6 @@ static int configure_one_function(struct rmi_function *fn)
return retval;
}
-static int rmi_driver_process_reset_requests(struct rmi_device *rmi_dev)
-{
- struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
- struct rmi_function *entry;
- int retval;
-
- list_for_each_entry(entry, &data->function_list, node) {
- retval = reset_one_function(entry);
- if (retval < 0)
- return retval;
- }
-
- return 0;
-}
-
static int rmi_driver_process_config_requests(struct rmi_device *rmi_dev)
{
struct rmi_driver_data *data = dev_get_drvdata(&rmi_dev->dev);
@@ -445,10 +411,6 @@ static int rmi_driver_reset_handler(struct rmi_device *rmi_dev)
return error;
}
- error = rmi_driver_process_reset_requests(rmi_dev);
- if (error < 0)
- return error;
-
error = rmi_driver_process_config_requests(rmi_dev);
if (error < 0)
return error;
None of the individual function drivers have ever implemented a reset() operation, meaning that reset_one_function() and in turn rmi_driver_process_reset_requests() have always been no-ops. Get rid of them. Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> --- drivers/input/rmi4/rmi_bus.h | 1 - drivers/input/rmi4/rmi_driver.c | 38 --------------------------------- 2 files changed, 39 deletions(-)