diff options
author | Guenter Roeck <linux@roeck-us.net> | 2012-01-24 20:55:00 -0500 |
---|---|---|
committer | Guenter Roeck <guenter.roeck@ericsson.com> | 2012-03-18 21:27:44 -0400 |
commit | f352df652ff37c434ed32bc5b7eb7ce430b73abc (patch) | |
tree | ef8d38b83e133f2424557d46dc9c2b2ca72732ce /drivers/hwmon/hwmon-vid.c | |
parent | 3230f7049e6325c27d6d40f2a1547cf75bc4ddff (diff) |
hwmon: (hwmon-vid) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: space required before the open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
Not fixed (url):
WARNING: line over 80 characters
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/hwmon-vid.c')
-rw-r--r-- | drivers/hwmon/hwmon-vid.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index 55f86c4deb44..9f26400713f0 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c | |||
@@ -83,18 +83,18 @@ int vid_from_reg(int val, u8 vrm) | |||
83 | { | 83 | { |
84 | int vid; | 84 | int vid; |
85 | 85 | ||
86 | switch(vrm) { | 86 | switch (vrm) { |
87 | 87 | ||
88 | case 100: /* VRD 10.0 */ | 88 | case 100: /* VRD 10.0 */ |
89 | /* compute in uV, round to mV */ | 89 | /* compute in uV, round to mV */ |
90 | val &= 0x3f; | 90 | val &= 0x3f; |
91 | if((val & 0x1f) == 0x1f) | 91 | if ((val & 0x1f) == 0x1f) |
92 | return 0; | 92 | return 0; |
93 | if((val & 0x1f) <= 0x09 || val == 0x0a) | 93 | if ((val & 0x1f) <= 0x09 || val == 0x0a) |
94 | vid = 1087500 - (val & 0x1f) * 25000; | 94 | vid = 1087500 - (val & 0x1f) * 25000; |
95 | else | 95 | else |
96 | vid = 1862500 - (val & 0x1f) * 25000; | 96 | vid = 1862500 - (val & 0x1f) * 25000; |
97 | if(val & 0x20) | 97 | if (val & 0x20) |
98 | vid -= 12500; | 98 | vid -= 12500; |
99 | return (vid + 500) / 1000; | 99 | return (vid + 500) / 1000; |
100 | 100 | ||
@@ -119,7 +119,7 @@ int vid_from_reg(int val, u8 vrm) | |||
119 | case 90: /* VRM 9.0 */ | 119 | case 90: /* VRM 9.0 */ |
120 | val &= 0x1f; | 120 | val &= 0x1f; |
121 | return val == 0x1f ? 0 : | 121 | return val == 0x1f ? 0 : |
122 | 1850 - val * 25; | 122 | 1850 - val * 25; |
123 | 123 | ||
124 | case 85: /* VRM 8.5 */ | 124 | case 85: /* VRM 8.5 */ |
125 | val &= 0x1f; | 125 | val &= 0x1f; |
@@ -134,7 +134,7 @@ int vid_from_reg(int val, u8 vrm) | |||
134 | val &= 0x1f; | 134 | val &= 0x1f; |
135 | return val == 0x1f ? 0 : | 135 | return val == 0x1f ? 0 : |
136 | val & 0x10 ? 5100 - (val) * 100 : | 136 | val & 0x10 ? 5100 - (val) * 100 : |
137 | 2050 - (val) * 50; | 137 | 2050 - (val) * 50; |
138 | case 17: /* Intel IMVP-II */ | 138 | case 17: /* Intel IMVP-II */ |
139 | val &= 0x1f; | 139 | val &= 0x1f; |
140 | return val & 0x10 ? 975 - (val & 0xF) * 25 : | 140 | return val & 0x10 ? 975 - (val & 0xF) * 25 : |
@@ -157,7 +157,7 @@ int vid_from_reg(int val, u8 vrm) | |||
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | } | 159 | } |
160 | 160 | EXPORT_SYMBOL(vid_from_reg); | |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * After this point is the code to automatically determine which | 163 | * After this point is the code to automatically determine which |
@@ -299,8 +299,6 @@ u8 vid_which_vrm(void) | |||
299 | return 0; | 299 | return 0; |
300 | } | 300 | } |
301 | #endif | 301 | #endif |
302 | |||
303 | EXPORT_SYMBOL(vid_from_reg); | ||
304 | EXPORT_SYMBOL(vid_which_vrm); | 302 | EXPORT_SYMBOL(vid_which_vrm); |
305 | 303 | ||
306 | MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>"); | 304 | MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>"); |