提交 e16de913 编写于 作者: G Graeme Smecher 提交者: Guenter Roeck

hwmon: (ad7314) Adds missing spi_dev initialization

This driver was recently moved from IIO (where it worked) to hwmon (where
it doesn't.) This breakage occured because the hwmon version neglected to
correctly initialize a reference to spi_dev in its drvdata. The result is a
segfault every time the temperature is queried.
Signed-off-by: NGraeme Smecher <gsmecher@threespeedlogic.com>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com>
上级 fbc729a4
...@@ -128,6 +128,7 @@ static int __devinit ad7314_probe(struct spi_device *spi_dev) ...@@ -128,6 +128,7 @@ static int __devinit ad7314_probe(struct spi_device *spi_dev)
ret = PTR_ERR(chip->hwmon_dev); ret = PTR_ERR(chip->hwmon_dev);
goto error_remove_group; goto error_remove_group;
} }
chip->spi_dev = spi_dev;
return 0; return 0;
error_remove_group: error_remove_group:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册