summaryrefslogtreecommitdiff
path: root/drivers/input/rmi4/rmi_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/rmi4/rmi_driver.c')
-rw-r--r--drivers/input/rmi4/rmi_driver.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index d64fc92858f2..4f2bb5947a4e 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -251,7 +251,7 @@ static int rmi_irq_init(struct rmi_device *rmi_dev)
ret = devm_request_threaded_irq(&rmi_dev->dev, pdata->irq, NULL,
rmi_irq_fn, irq_flags | IRQF_ONESHOT,
- dev_name(rmi_dev->xport->dev),
+ dev_driver_string(rmi_dev->xport->dev),
rmi_dev);
if (ret < 0) {
dev_err(&rmi_dev->dev, "Failed to register interrupt %d\n",
@@ -1234,16 +1234,21 @@ static int rmi_driver_probe(struct device *dev)
if (retval < 0)
goto err_destroy_functions;
- if (data->f01_container->dev.driver)
+ if (data->f01_container->dev.driver) {
/* Driver already bound, so enable ATTN now. */
- return rmi_enable_sensor(rmi_dev);
+ retval = rmi_enable_sensor(rmi_dev);
+ if (retval)
+ goto err_disable_irq;
+ }
return 0;
+err_disable_irq:
+ rmi_disable_irq(rmi_dev, false);
err_destroy_functions:
rmi_free_function_list(rmi_dev);
err:
- return retval < 0 ? retval : 0;
+ return retval;
}
static struct rmi_driver rmi_physical_driver = {