Skip to content

Commit

Permalink
hwmon: (ad7314) Adds missing spi_dev initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Graeme Smecher authored and Guenter Roeck committed Apr 4, 2012
1 parent fbc729a commit e16de91
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hwmon/ad7314.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e16de91

Please sign in to comment.