提交 2fdf4cd9 编写于 作者: A Alexander Stein 提交者: Dmitry Torokhov

Input: ads7846 - fix device usage within attribute show

With commit e585c40b (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: NAlexander Stein <alexanders83@web.de>
Acked-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 06491e84
......@@ -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; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册