mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
hwmon: (ad7314) Remove unused defines, and rename OFFSET to SHIFT
Remove unused defines AD7314_PD, AD7314_TEMP_SIGN, and ADT7301_TEMP_SIGN. Rename AD7314_TEMP_OFFSET to the more appropriate AD7314_TEMP_SHIFT. Signed-off-by: Guenter Roeck <[email protected]> Cc: Jonathan Cameron <[email protected]> Acked-by: Jean Delvare <[email protected]>
This commit is contained in:
parent
7bb5ee0169
commit
1137a9a649
1 changed files with 2 additions and 9 deletions
|
|
@ -17,22 +17,15 @@
|
|||
#include <linux/hwmon.h>
|
||||
#include <linux/hwmon-sysfs.h>
|
||||
|
||||
/*
|
||||
* AD7314 power mode
|
||||
*/
|
||||
#define AD7314_PD 0x2000
|
||||
|
||||
/*
|
||||
* AD7314 temperature masks
|
||||
*/
|
||||
#define AD7314_TEMP_SIGN 0x200
|
||||
#define AD7314_TEMP_MASK 0x7FE0
|
||||
#define AD7314_TEMP_OFFSET 5
|
||||
#define AD7314_TEMP_SHIFT 5
|
||||
|
||||
/*
|
||||
* ADT7301 and ADT7302 temperature masks
|
||||
*/
|
||||
#define ADT7301_TEMP_SIGN 0x2000
|
||||
#define ADT7301_TEMP_MASK 0x3FFF
|
||||
|
||||
enum ad7314_variant {
|
||||
|
|
@ -73,7 +66,7 @@ static ssize_t ad7314_show_temperature(struct device *dev,
|
|||
return ret;
|
||||
switch (spi_get_device_id(chip->spi_dev)->driver_data) {
|
||||
case ad7314:
|
||||
data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET;
|
||||
data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_SHIFT;
|
||||
data = (data << 6) >> 6;
|
||||
|
||||
return sprintf(buf, "%d\n", 250 * data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue