linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christopher Heiny <cheiny@synaptics.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Linux Input <linux-input@vger.kernel.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	Vincent Huang <vincent.huang@tw.synaptics.com>,
	Vivian Ly <vly@synaptics.com>,
	Daniel Rosenberg <daniel.rosenberg@synaptics.com>,
	Jean Delvare <khali@linux-fr.org>,
	Joerie de Gram <j.de.gram@gmail.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: Re: [PATCH v2] input: synaptics-rmi4 - use snprintf instead of sprintf in rmi_i2c.c
Date: Thu, 9 Jan 2014 14:47:19 -0800	[thread overview]
Message-ID: <52CF26F7.3020904@synaptics.com> (raw)
In-Reply-To: <20140109222546.GA20994@core.coreip.homeip.net>

On 01/09/2014 02:25 PM, Dmitry Torokhov wrote:
> Input: synaptics-rmi4 - fix disabling gpio config in i2c transport
>
> From: Dmitry Torokhov<dmitry.torokhov@gmail.com>
>
> We need to pass into pdata->gpio_config() gpio_data which is already a
> pointer, and not its address.
>
> Signed-off-by: Dmitry Torokhov<dmitry.torokhov@gmail.com>
> ---
>   drivers/input/rmi4/rmi_i2c.c |    8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c
> index ebe74ec..12aea8c 100644
> --- a/drivers/input/rmi4/rmi_i2c.c
> +++ b/drivers/input/rmi4/rmi_i2c.c
> @@ -168,7 +168,8 @@ exit:
>   static int rmi_i2c_probe(struct i2c_client *client,
>   			 const struct i2c_device_id *id)
>   {
> -	const struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
> +	const struct rmi_device_platform_data *pdata =
> +				dev_get_platdata(&client->dev);
>   	struct rmi_transport_dev *xport;
>   	struct rmi_i2c_data *data;
>   	int retval;
> @@ -250,12 +251,13 @@ err_gpio:
>   static int rmi_i2c_remove(struct i2c_client *client)
>   {
>   	struct rmi_transport_dev *xport = i2c_get_clientdata(client);
> -	struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
> +	const struct rmi_device_platform_data *pdata =
> +				dev_get_platdata(&client->dev);
>
>   	rmi_unregister_transport_device(xport);
>
>   	if (pdata->gpio_config)
> -		pdata->gpio_config(&pdata->gpio_data, false);
> +		pdata->gpio_config(pdata->gpio_data, false);
>
>   	return 0;
>   }

It's just plain freaky that no problem ever arose from that, but 
definitely it's a bug.

Acked-by: Christopher Heiny <cheiny@synaptics.com>

      reply	other threads:[~2014-01-09 22:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09  1:18 [PATCH v2] input: synaptics-rmi4 - use snprintf instead of sprintf in rmi_i2c.c Christopher Heiny
2014-01-09  8:04 ` Dmitry Torokhov
2014-01-09  8:28   ` Dmitry Torokhov
2014-01-09 20:29     ` Christopher Heiny
2014-01-09 20:48       ` Dmitry Torokhov
2014-01-09 21:02         ` Christopher Heiny
2014-01-09 21:23   ` Christopher Heiny
2014-01-09 21:29     ` Dmitry Torokhov
2014-01-09 21:38       ` Christopher Heiny
2014-01-09 22:11         ` Christopher Heiny
2014-01-09 22:25           ` Dmitry Torokhov
2014-01-09 22:47             ` Christopher Heiny [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52CF26F7.3020904@synaptics.com \
    --to=cheiny@synaptics.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=daniel.rosenberg@synaptics.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=j.de.gram@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-input@vger.kernel.org \
    --cc=vincent.huang@tw.synaptics.com \
    --cc=vly@synaptics.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).