Skip to content

Commit

Permalink
Input: ads7846 - fix device usage within attribute show
Browse files Browse the repository at this point in the history
With commit e585c40 (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>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Alexander Stein authored and Dmitry Torokhov committed Apr 19, 2014
1 parent 06491e8 commit 2fdf4cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down

0 comments on commit 2fdf4cd

Please sign in to comment.