diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-02-21 16:16:55 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-02-22 10:07:30 +0100 |
commit | edb15d83a875a1f4b1576188844db5c330c3267d (patch) | |
tree | 74d54eab401b6ccf2a6ad4821227108a8d160f03 /drivers/hwmon/lm85.c | |
parent | 8bfc245f9ad7bd4e461179e4e7852ef99b8b6144 (diff) | |
parent | a0b1c42951dd06ec83cc1bc2c9788131d9fefcd8 (diff) | |
download | linux-edb15d83a875a1f4b1576188844db5c330c3267d.tar.gz linux-edb15d83a875a1f4b1576188844db5c330c3267d.tar.bz2 linux-edb15d83a875a1f4b1576188844db5c330c3267d.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into mips-for-linux-next
Conflicts:
include/linux/ssb/ssb_driver_gige.h
Also resolves a logical merge conflict in drivers/net/ethernet/broadcom/-
bgmac.c due to change of an API.
Diffstat (limited to 'drivers/hwmon/lm85.c')
-rw-r--r-- | drivers/hwmon/lm85.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c index 9f2dd77e1e0e..47ade8ba152d 100644 --- a/drivers/hwmon/lm85.c +++ b/drivers/hwmon/lm85.c @@ -139,7 +139,7 @@ static const int lm85_scaling[] = { /* .001 Volts */ #define SCALE(val, from, to) (((val) * (to) + ((from) / 2)) / (from)) #define INS_TO_REG(n, val) \ - SENSORS_LIMIT(SCALE(val, lm85_scaling[n], 192), 0, 255) + clamp_val(SCALE(val, lm85_scaling[n], 192), 0, 255) #define INSEXT_FROM_REG(n, val, ext) \ SCALE(((val) << 4) + (ext), 192 << 4, lm85_scaling[n]) @@ -151,19 +151,19 @@ static inline u16 FAN_TO_REG(unsigned long val) { if (!val) return 0xffff; - return SENSORS_LIMIT(5400000 / val, 1, 0xfffe); + return clamp_val(5400000 / val, 1, 0xfffe); } #define FAN_FROM_REG(val) ((val) == 0 ? -1 : (val) == 0xffff ? 0 : \ 5400000 / (val)) /* Temperature is reported in .001 degC increments */ #define TEMP_TO_REG(val) \ - SENSORS_LIMIT(SCALE(val, 1000, 1), -127, 127) + clamp_val(SCALE(val, 1000, 1), -127, 127) #define TEMPEXT_FROM_REG(val, ext) \ SCALE(((val) << 4) + (ext), 16, 1000) #define TEMP_FROM_REG(val) ((val) * 1000) -#define PWM_TO_REG(val) SENSORS_LIMIT(val, 0, 255) +#define PWM_TO_REG(val) clamp_val(val, 0, 255) #define PWM_FROM_REG(val) (val) @@ -258,7 +258,7 @@ static int ZONE_TO_REG(int zone) return i << 5; } -#define HYST_TO_REG(val) SENSORS_LIMIT(((val) + 500) / 1000, 0, 15) +#define HYST_TO_REG(val) clamp_val(((val) + 500) / 1000, 0, 15) #define HYST_FROM_REG(val) ((val) * 1000) /* |