diff options
| author | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:09 +0100 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2012-05-07 16:09:35 +0100 | 
| commit | 4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd (patch) | |
| tree | 33c02b5e18e79756005a3edfa7c862a47de668d5 /drivers/hwmon/ad7314.c | |
| parent | 4086b1e2b19729eebf632073b9d4ab811726d8eb (diff) | |
| parent | dc257cf154be708ecc47b8b89c12ad8cd2cc35e4 (diff) | |
| download | olio-linux-3.10-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.tar.xz olio-linux-3.10-4f256e8aa3eda15c11c3cec3ec5336e1fc579cbd.zip  | |
Merge branch 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next
Daniel prepared this branch with a back-merge as git was getting
very confused about changes in intel_display.c
Diffstat (limited to 'drivers/hwmon/ad7314.c')
| -rw-r--r-- | drivers/hwmon/ad7314.c | 12 | 
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c index ce43642ef03..f85ce70d967 100644 --- a/drivers/hwmon/ad7314.c +++ b/drivers/hwmon/ad7314.c @@ -47,7 +47,7 @@ struct ad7314_data {  	u16 rx ____cacheline_aligned;  }; -static int ad7314_spi_read(struct ad7314_data *chip, s16 *data) +static int ad7314_spi_read(struct ad7314_data *chip)  {  	int ret; @@ -57,9 +57,7 @@ static int ad7314_spi_read(struct ad7314_data *chip, s16 *data)  		return ret;  	} -	*data = be16_to_cpu(chip->rx); - -	return ret; +	return be16_to_cpu(chip->rx);  }  static ssize_t ad7314_show_temperature(struct device *dev, @@ -70,12 +68,12 @@ static ssize_t ad7314_show_temperature(struct device *dev,  	s16 data;  	int ret; -	ret = ad7314_spi_read(chip, &data); +	ret = ad7314_spi_read(chip);  	if (ret < 0)  		return ret;  	switch (spi_get_device_id(chip->spi_dev)->driver_data) {  	case ad7314: -		data = (data & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET; +		data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET;  		data = (data << 6) >> 6;  		return sprintf(buf, "%d\n", 250 * data); @@ -86,7 +84,7 @@ static ssize_t ad7314_show_temperature(struct device *dev,  		 * with a sign bit - which is a 14 bit 2's complement  		 * register.  1lsb - 31.25 milli degrees centigrade  		 */ -		data &= ADT7301_TEMP_MASK; +		data = ret & ADT7301_TEMP_MASK;  		data = (data << 2) >> 2;  		return sprintf(buf, "%d\n",  |