diff options
Diffstat (limited to 'drivers/hwmon')
-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>"); |