diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-12-02 17:49:10 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-12-02 17:51:32 -0800 |
commit | ae9979c31007d5366b73640ee7dcbb271357053e (patch) | |
tree | 90e2a51cccf83eccb72bdab6fac1e668ee4defe1 /drivers/input/rmi4/rmi_f30.c | |
parent | b908d3cd812abe3f4a74d7550bbf0a8cbcfbe6ed (diff) | |
download | linux-ae9979c31007d5366b73640ee7dcbb271357053e.tar.bz2 |
Input: synaptics-rmi4 - store the attn data in the driver
Now that we have a proper API to set the attention data, there is
no point in keeping it in the transport driver.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/rmi4/rmi_f30.c')
-rw-r--r-- | drivers/input/rmi4/rmi_f30.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/rmi4/rmi_f30.c b/drivers/input/rmi4/rmi_f30.c index f696137a56f5..f4b491e3e0fd 100644 --- a/drivers/input/rmi4/rmi_f30.c +++ b/drivers/input/rmi4/rmi_f30.c @@ -99,6 +99,7 @@ static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits) { struct f30_data *f30 = dev_get_drvdata(&fn->dev); struct rmi_device *rmi_dev = fn->rmi_dev; + struct rmi_driver_data *drvdata = dev_get_drvdata(&rmi_dev->dev); int retval; int gpiled = 0; int value = 0; @@ -109,15 +110,15 @@ static int rmi_f30_attention(struct rmi_function *fn, unsigned long *irq_bits) return 0; /* Read the gpi led data. */ - if (rmi_dev->xport->attn_data) { - if (rmi_dev->xport->attn_size < f30->register_count) { + if (drvdata->attn_data.data) { + if (drvdata->attn_data.size < f30->register_count) { dev_warn(&fn->dev, "F30 interrupted, but data is missing\n"); return 0; } - memcpy(f30->data_regs, rmi_dev->xport->attn_data, + memcpy(f30->data_regs, drvdata->attn_data.data, f30->register_count); - rmi_dev->xport->attn_data += f30->register_count; - rmi_dev->xport->attn_size -= f30->register_count; + drvdata->attn_data.data += f30->register_count; + drvdata->attn_data.size -= f30->register_count; } else { retval = rmi_read_block(rmi_dev, fn->fd.data_base_addr, f30->data_regs, f30->register_count); |