summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ad7314.c
diff options
context:
space:
mode:
authorGraeme Smecher <gsmecher@threespeedlogic.com>2012-04-04 03:42:21 +0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-04-04 04:08:28 +0400
commite16de9137c8beab02d78fb4fa82bb96e9f3d0ac3 (patch)
treecbb7b2c9ab82934c0980f7d4a7ce471c50d4405f /drivers/hwmon/ad7314.c
parentfbc729a446f7d80ec8b73fe90d8c0cc3e95ad277 (diff)
downloadlinux-e16de9137c8beab02d78fb4fa82bb96e9f3d0ac3.tar.xz
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: Graeme Smecher <gsmecher@threespeedlogic.com> Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon/ad7314.c')
-rw-r--r--drivers/hwmon/ad7314.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c
index 0e0cfcc36f8d..ce43642ef03e 100644
--- a/drivers/hwmon/ad7314.c
+++ b/drivers/hwmon/ad7314.c
@@ -128,6 +128,7 @@ static int __devinit ad7314_probe(struct spi_device *spi_dev)
ret = PTR_ERR(chip->hwmon_dev);
goto error_remove_group;
}
+ chip->spi_dev = spi_dev;
return 0;
error_remove_group: