diff options
author | Alexander Stein <alexanders83@web.de> | 2014-04-12 13:42:24 -0700 |
---|---|---|
committer | Fugang Duan <b38611@freescale.com> | 2015-07-23 16:19:46 +0800 |
commit | 87c6f5948b53342830151d10144ce331140757db (patch) | |
tree | c047599be4bbb0a2479a11aa14c392be8a7783ab | |
parent | 96ae4cca79ac4997b3a9db80ff87ac9f86c131fa (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>
-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 584113a31036..8186429e946b 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; \ |