linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: ads7846: Fix device usage within attribute show
@ 2014-04-11 20:03 Alexander Stein
  2014-04-11 21:53 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Stein @ 2014-04-11 20:03 UTC (permalink / raw)
  To: Dmitry Torokhov, Guenter Roeck; +Cc: Alexander Stein, linux-input

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>
---
 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; \
-- 
1.9.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Input: ads7846: Fix device usage within attribute show
  2014-04-11 20:03 [PATCH] Input: ads7846: Fix device usage within attribute show Alexander Stein
@ 2014-04-11 21:53 ` Guenter Roeck
  2014-04-12 20:43   ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2014-04-11 21:53 UTC (permalink / raw)
  To: Alexander Stein, Dmitry Torokhov; +Cc: linux-input

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; \
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Input: ads7846: Fix device usage within attribute show
  2014-04-11 21:53 ` Guenter Roeck
@ 2014-04-12 20:43   ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2014-04-12 20:43 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Alexander Stein, linux-input

On Fri, Apr 11, 2014 at 02:53:16PM -0700, Guenter Roeck wrote:
> 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>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-12 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 20:03 [PATCH] Input: ads7846: Fix device usage within attribute show Alexander Stein
2014-04-11 21:53 ` Guenter Roeck
2014-04-12 20:43   ` Dmitry Torokhov

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).