diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-03-14 00:40:39 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 06:16:40 +0200 |
commit | 088ce2ac9ebac5c74faf4d39083627875fa6f0f0 (patch) | |
tree | 4e62aa545bf3fc762ec35538799dcfc24751e769 /drivers/hwmon/lm93.c | |
parent | hwmon: (nct6775) Drop read/write lock (diff) | |
download | linux-088ce2ac9ebac5c74faf4d39083627875fa6f0f0.tar.xz linux-088ce2ac9ebac5c74faf4d39083627875fa6f0f0.zip |
hwmon: Fix CamelCase checkpatch warnings
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm93.c')
-rw-r--r-- | drivers/hwmon/lm93.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/hwmon/lm93.c b/drivers/hwmon/lm93.c index b40f34cdb3ca..340382f173a0 100644 --- a/drivers/hwmon/lm93.c +++ b/drivers/hwmon/lm93.c @@ -354,12 +354,12 @@ static const unsigned long lm93_vin_val_max[16] = { static unsigned LM93_IN_FROM_REG(int nr, u8 reg) { - const long uV_max = lm93_vin_val_max[nr] * 1000; - const long uV_min = lm93_vin_val_min[nr] * 1000; + const long uv_max = lm93_vin_val_max[nr] * 1000; + const long uv_min = lm93_vin_val_min[nr] * 1000; - const long slope = (uV_max - uV_min) / + const long slope = (uv_max - uv_min) / (lm93_vin_reg_max[nr] - lm93_vin_reg_min[nr]); - const long intercept = uV_min - slope * lm93_vin_reg_min[nr]; + const long intercept = uv_min - slope * lm93_vin_reg_min[nr]; return (slope * reg + intercept + 500) / 1000; } @@ -371,20 +371,20 @@ static unsigned LM93_IN_FROM_REG(int nr, u8 reg) static u8 LM93_IN_TO_REG(int nr, unsigned val) { /* range limit */ - const long mV = clamp_val(val, + const long mv = clamp_val(val, lm93_vin_val_min[nr], lm93_vin_val_max[nr]); /* try not to lose too much precision here */ - const long uV = mV * 1000; - const long uV_max = lm93_vin_val_max[nr] * 1000; - const long uV_min = lm93_vin_val_min[nr] * 1000; + const long uv = mv * 1000; + const long uv_max = lm93_vin_val_max[nr] * 1000; + const long uv_min = lm93_vin_val_min[nr] * 1000; /* convert */ - const long slope = (uV_max - uV_min) / + const long slope = (uv_max - uv_min) / (lm93_vin_reg_max[nr] - lm93_vin_reg_min[nr]); - const long intercept = uV_min - slope * lm93_vin_reg_min[nr]; + const long intercept = uv_min - slope * lm93_vin_reg_min[nr]; - u8 result = ((uV - intercept + (slope/2)) / slope); + u8 result = ((uv - intercept + (slope/2)) / slope); result = clamp_val(result, lm93_vin_reg_min[nr], lm93_vin_reg_max[nr]); return result; @@ -393,10 +393,10 @@ static u8 LM93_IN_TO_REG(int nr, unsigned val) /* vid in mV, upper == 0 indicates low limit, otherwise upper limit */ static unsigned LM93_IN_REL_FROM_REG(u8 reg, int upper, int vid) { - const long uV_offset = upper ? (((reg >> 4 & 0x0f) + 1) * 12500) : + const long uv_offset = upper ? (((reg >> 4 & 0x0f) + 1) * 12500) : (((reg >> 0 & 0x0f) + 1) * -25000); - const long uV_vid = vid * 1000; - return (uV_vid + uV_offset + 5000) / 10000; + const long uv_vid = vid * 1000; + return (uv_vid + uv_offset + 5000) / 10000; } #define LM93_IN_MIN_FROM_REG(reg, vid) LM93_IN_REL_FROM_REG((reg), 0, (vid)) @@ -409,13 +409,13 @@ static unsigned LM93_IN_REL_FROM_REG(u8 reg, int upper, int vid) */ static u8 LM93_IN_REL_TO_REG(unsigned val, int upper, int vid) { - long uV_offset = vid * 1000 - val * 10000; + long uv_offset = vid * 1000 - val * 10000; if (upper) { - uV_offset = clamp_val(uV_offset, 12500, 200000); - return (u8)((uV_offset / 12500 - 1) << 4); + uv_offset = clamp_val(uv_offset, 12500, 200000); + return (u8)((uv_offset / 12500 - 1) << 4); } else { - uV_offset = clamp_val(uV_offset, -400000, -25000); - return (u8)((uV_offset / -25000 - 1) << 0); + uv_offset = clamp_val(uv_offset, -400000, -25000); + return (u8)((uv_offset / -25000 - 1) << 0); } } |