diff options
author | Alexander Stein <alexanders83@web.de> | 2014-04-12 16:42:24 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-04-19 16:55:59 -0400 |
commit | 2fdf4cd9a2afb113e566dfe6ee5df55ada8c0631 (patch) | |
tree | 35e240671fb564bfdcbbb0109fdbc083d0170a17 /drivers/input/touchscreen/ads7846.c | |
parent | 06491e84f0f95dbe105b74fef32e7063e349f2d7 (diff) |
Input: ads7846 - fix device usage within attribute show
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>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 45a06e495ed2..7f8aa981500d 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) | |||
425 | name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ | 425 | name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ |
426 | { \ | 426 | { \ |
427 | struct ads7846 *ts = dev_get_drvdata(dev); \ | 427 | struct ads7846 *ts = dev_get_drvdata(dev); \ |
428 | ssize_t v = ads7846_read12_ser(dev, \ | 428 | ssize_t v = ads7846_read12_ser(&ts->spi->dev, \ |
429 | READ_12BIT_SER(var)); \ | 429 | READ_12BIT_SER(var)); \ |
430 | if (v < 0) \ | 430 | if (v < 0) \ |
431 | return v; \ | 431 | return v; \ |