From: Guenter Roeck <linux@roeck-us.net>
To: Alexander Stein <alexanders83@web.de>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: ads7846: Fix device usage within attribute show
Date: Fri, 11 Apr 2014 14:53:16 -0700 [thread overview]
Message-ID: <5348644C.7070109@roeck-us.net> (raw)
In-Reply-To: <1397246613-26538-1-git-send-email-alexanders83@web.de>
On 04/11/2014 01:03 PM, Alexander Stein wrote:
> With commit e585c40ba (Input: ads7846 - convert to
> hwmon_device_register_with_groups()) the device passed to the attribute's
> show function isn't the spi device as before.
> So fixup the passed device to ads7846_read12_ser.
>
> Signed-off-by: Alexander Stein <alexanders83@web.de>
And I thought I got that right. Oh well.
Acked-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/input/touchscreen/ads7846.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index 180ff7a..3824369 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -425,7 +425,7 @@ static int ads7845_read12_ser(struct device *dev, unsigned command)
> name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
> { \
> struct ads7846 *ts = dev_get_drvdata(dev); \
> - ssize_t v = ads7846_read12_ser(dev, \
> + ssize_t v = ads7846_read12_ser(&ts->spi->dev, \
> READ_12BIT_SER(var)); \
> if (v < 0) \
> return v; \
>
next prev parent reply other threads:[~2014-04-11 21:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 20:03 [PATCH] Input: ads7846: Fix device usage within attribute show Alexander Stein
2014-04-11 21:53 ` Guenter Roeck [this message]
2014-04-12 20:43 ` Dmitry Torokhov
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=5348644C.7070109@roeck-us.net \
--to=linux@roeck-us.net \
--cc=alexanders83@web.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.