diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-04-22 00:22:00 -0400 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-05-20 22:41:49 -0400 |
commit | 1137a9a649db818869905b010b120a95a01b0d24 (patch) | |
tree | 2c203551a1cfa87cc76249832ed966472106ab70 /drivers/hwmon/ad7314.c | |
parent | 7bb5ee0169b80d40aa7d4854c07f1c2a90efc5b8 (diff) |
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 <linux@roeck-us.net>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/ad7314.c')
-rw-r--r-- | drivers/hwmon/ad7314.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c index f85ce70d9677..cfec802cf9ca 100644 --- a/drivers/hwmon/ad7314.c +++ b/drivers/hwmon/ad7314.c | |||
@@ -18,21 +18,14 @@ | |||
18 | #include <linux/hwmon-sysfs.h> | 18 | #include <linux/hwmon-sysfs.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * AD7314 power mode | ||
22 | */ | ||
23 | #define AD7314_PD 0x2000 | ||
24 | |||
25 | /* | ||
26 | * AD7314 temperature masks | 21 | * AD7314 temperature masks |
27 | */ | 22 | */ |
28 | #define AD7314_TEMP_SIGN 0x200 | ||
29 | #define AD7314_TEMP_MASK 0x7FE0 | 23 | #define AD7314_TEMP_MASK 0x7FE0 |
30 | #define AD7314_TEMP_OFFSET 5 | 24 | #define AD7314_TEMP_SHIFT 5 |
31 | 25 | ||
32 | /* | 26 | /* |
33 | * ADT7301 and ADT7302 temperature masks | 27 | * ADT7301 and ADT7302 temperature masks |
34 | */ | 28 | */ |
35 | #define ADT7301_TEMP_SIGN 0x2000 | ||
36 | #define ADT7301_TEMP_MASK 0x3FFF | 29 | #define ADT7301_TEMP_MASK 0x3FFF |
37 | 30 | ||
38 | enum ad7314_variant { | 31 | enum ad7314_variant { |
@@ -73,7 +66,7 @@ static ssize_t ad7314_show_temperature(struct device *dev, | |||
73 | return ret; | 66 | return ret; |
74 | switch (spi_get_device_id(chip->spi_dev)->driver_data) { | 67 | switch (spi_get_device_id(chip->spi_dev)->driver_data) { |
75 | case ad7314: | 68 | case ad7314: |
76 | data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_OFFSET; | 69 | data = (ret & AD7314_TEMP_MASK) >> AD7314_TEMP_SHIFT; |
77 | data = (data << 6) >> 6; | 70 | data = (data << 6) >> 6; |
78 | 71 | ||
79 | return sprintf(buf, "%d\n", 250 * data); | 72 | return sprintf(buf, "%d\n", 250 * data); |