diff options
author | Nick Dyer <nick@shmanahar.org> | 2018-06-05 10:17:51 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-06-05 10:33:35 -0700 |
commit | 24d28e4f1271cb2f91613dada8f2acccd00eff56 (patch) | |
tree | c1b0b3e5a9bfc33fc89e383c540315251b8979c1 /drivers/input/rmi4/rmi_f01.c | |
parent | 8f6a652a8c1379023775709e3db6c6f7c1bdb2ab (diff) | |
download | lwn-24d28e4f1271cb2f91613dada8f2acccd00eff56.tar.gz lwn-24d28e4f1271cb2f91613dada8f2acccd00eff56.zip |
Input: synaptics-rmi4 - convert irq distribution to irq_domain
Convert the RMI driver to use the standard mechanism for
distributing IRQs to the various functions.
Tested on:
* S7300 (F11, F34, F54)
* S7817 (F12, F34, F54)
Signed-off-by: Nick Dyer <nick@shmanahar.org>
Acked-by: Christopher Heiny <cheiny@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/rmi4/rmi_f01.c')
-rw-r--r-- | drivers/input/rmi4/rmi_f01.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index 8a07ae147df6..4edaa14fe878 100644 --- a/drivers/input/rmi4/rmi_f01.c +++ b/drivers/input/rmi4/rmi_f01.c @@ -681,9 +681,9 @@ static int rmi_f01_resume(struct rmi_function *fn) return 0; } -static int rmi_f01_attention(struct rmi_function *fn, - unsigned long *irq_bits) +static irqreturn_t rmi_f01_attention(int irq, void *ctx) { + struct rmi_function *fn = ctx; struct rmi_device *rmi_dev = fn->rmi_dev; int error; u8 device_status; @@ -692,7 +692,7 @@ static int rmi_f01_attention(struct rmi_function *fn, if (error) { dev_err(&fn->dev, "Failed to read device status: %d.\n", error); - return error; + return IRQ_RETVAL(error); } if (RMI_F01_STATUS_BOOTLOADER(device_status)) @@ -704,11 +704,11 @@ static int rmi_f01_attention(struct rmi_function *fn, error = rmi_dev->driver->reset_handler(rmi_dev); if (error) { dev_err(&fn->dev, "Device reset failed: %d\n", error); - return error; + return IRQ_RETVAL(error); } } - return 0; + return IRQ_HANDLED; } struct rmi_function_handler rmi_f01_handler = { |