[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52FD35FC.1060706@synaptics.com>
Date: Thu, 13 Feb 2014 13:15:40 -0800
From: Christopher Heiny <cheiny@...aptics.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: Andrew Duggan <aduggan@...aptics.com>,
Vincent Huang <vincent.huang@...synaptics.com>,
Vivian Ly <vly@...aptics.com>,
Daniel Rosenberg <daniel.rosenberg@...aptics.com>,
Linus Walleij <linus.walleij@...ricsson.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Courtney Cavin <courtney.cavin@...ymobile.com>,
Linux Input <linux-input@...r.kernel.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/11] Input: synaptics-rmi4 - remove device_status form
f01_data
On 02/12/2014 09:27 PM, Dmitry Torokhov wrote:
> We do not need to persist it - we read it when signalled.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
Acked-by: Christopher Heiny <cheiny@...aptics.com>
> ---
> drivers/input/rmi4/rmi_f01.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c
> index 6f90a6c..1e49ab4 100644
> --- a/drivers/input/rmi4/rmi_f01.c
> +++ b/drivers/input/rmi4/rmi_f01.c
> @@ -126,8 +126,6 @@ struct f01_data {
>
> struct f01_device_control device_control;
>
> - u8 device_status;
> -
> u16 interrupt_enable_addr;
> u16 doze_interval_addr;
> u16 wakeup_threshold_addr;
> @@ -212,6 +210,7 @@ static int rmi_f01_initialize(struct rmi_function *fn)
> struct rmi_driver_data *driver_data = dev_get_drvdata(&rmi_dev->dev);
> struct f01_data *data = fn->data;
> struct rmi_device_platform_data *pdata = to_rmi_platform_data(rmi_dev);
> + u8 device_status;
>
> /*
> * Set the configured bit and (optionally) other important stuff
> @@ -346,16 +345,16 @@ static int rmi_f01_initialize(struct rmi_function *fn)
> }
>
> error = rmi_read_block(rmi_dev, fn->fd.data_base_addr,
> - &data->device_status, sizeof(data->device_status));
> + &device_status, sizeof(device_status));
> if (error < 0) {
> dev_err(&fn->dev, "Failed to read device status.\n");
> return error;
> }
>
> - if (RMI_F01_STATUS_UNCONFIGURED(data->device_status)) {
> + if (RMI_F01_STATUS_UNCONFIGURED(device_status)) {
> dev_err(&fn->dev,
> "Device was reset during configuration process, status: %#02x!\n",
> - RMI_F01_STATUS_CODE(data->device_status));
> + RMI_F01_STATUS_CODE(device_status));
> return -EINVAL;
> }
>
> @@ -497,18 +496,18 @@ static int rmi_f01_attention(struct rmi_function *fn,
> unsigned long *irq_bits)
> {
> struct rmi_device *rmi_dev = fn->rmi_dev;
> - struct f01_data *data = fn->data;
> int retval;
> + u8 device_status;
>
> retval = rmi_read_block(rmi_dev, fn->fd.data_base_addr,
> - &data->device_status, sizeof(data->device_status));
> + &device_status, sizeof(device_status));
> if (retval < 0) {
> dev_err(&fn->dev, "Failed to read device status, code: %d.\n",
> retval);
> return retval;
> }
>
> - if (RMI_F01_STATUS_UNCONFIGURED(data->device_status)) {
> + if (RMI_F01_STATUS_UNCONFIGURED(device_status)) {
> dev_warn(&fn->dev, "Device reset detected.\n");
> retval = rmi_dev->driver->reset_handler(rmi_dev);
> if (retval < 0)
>
--
Christopher Heiny
Senior Staff Firmware Engineer
Synaptics Incorporated
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists