diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-03-13 19:40:39 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-08 00:16:40 -0400 |
commit | 088ce2ac9ebac5c74faf4d39083627875fa6f0f0 (patch) | |
tree | 4e62aa545bf3fc762ec35538799dcfc24751e769 /drivers/hwmon/asc7621.c | |
parent | 236d9039480059f97dc9d3cd75e3651582b62997 (diff) |
hwmon: Fix CamelCase checkpatch warnings
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/asc7621.c')
-rw-r--r-- | drivers/hwmon/asc7621.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c index da7f5b5d5db5..3ad9d849add2 100644 --- a/drivers/hwmon/asc7621.c +++ b/drivers/hwmon/asc7621.c | |||
@@ -159,12 +159,12 @@ static inline int write_byte(struct i2c_client *client, u8 reg, u8 data) | |||
159 | * and retrieval of like parameters. | 159 | * and retrieval of like parameters. |
160 | */ | 160 | */ |
161 | 161 | ||
162 | #define SETUP_SHOW_data_param(d, a) \ | 162 | #define SETUP_SHOW_DATA_PARAM(d, a) \ |
163 | struct sensor_device_attribute *sda = to_sensor_dev_attr(a); \ | 163 | struct sensor_device_attribute *sda = to_sensor_dev_attr(a); \ |
164 | struct asc7621_data *data = asc7621_update_device(d); \ | 164 | struct asc7621_data *data = asc7621_update_device(d); \ |
165 | struct asc7621_param *param = to_asc7621_param(sda) | 165 | struct asc7621_param *param = to_asc7621_param(sda) |
166 | 166 | ||
167 | #define SETUP_STORE_data_param(d, a) \ | 167 | #define SETUP_STORE_DATA_PARAM(d, a) \ |
168 | struct sensor_device_attribute *sda = to_sensor_dev_attr(a); \ | 168 | struct sensor_device_attribute *sda = to_sensor_dev_attr(a); \ |
169 | struct i2c_client *client = to_i2c_client(d); \ | 169 | struct i2c_client *client = to_i2c_client(d); \ |
170 | struct asc7621_data *data = i2c_get_clientdata(client); \ | 170 | struct asc7621_data *data = i2c_get_clientdata(client); \ |
@@ -177,7 +177,7 @@ static inline int write_byte(struct i2c_client *client, u8 reg, u8 data) | |||
177 | static ssize_t show_u8(struct device *dev, struct device_attribute *attr, | 177 | static ssize_t show_u8(struct device *dev, struct device_attribute *attr, |
178 | char *buf) | 178 | char *buf) |
179 | { | 179 | { |
180 | SETUP_SHOW_data_param(dev, attr); | 180 | SETUP_SHOW_DATA_PARAM(dev, attr); |
181 | 181 | ||
182 | return sprintf(buf, "%u\n", data->reg[param->msb[0]]); | 182 | return sprintf(buf, "%u\n", data->reg[param->msb[0]]); |
183 | } | 183 | } |
@@ -185,7 +185,7 @@ static ssize_t show_u8(struct device *dev, struct device_attribute *attr, | |||
185 | static ssize_t store_u8(struct device *dev, struct device_attribute *attr, | 185 | static ssize_t store_u8(struct device *dev, struct device_attribute *attr, |
186 | const char *buf, size_t count) | 186 | const char *buf, size_t count) |
187 | { | 187 | { |
188 | SETUP_STORE_data_param(dev, attr); | 188 | SETUP_STORE_DATA_PARAM(dev, attr); |
189 | long reqval; | 189 | long reqval; |
190 | 190 | ||
191 | if (kstrtol(buf, 10, &reqval)) | 191 | if (kstrtol(buf, 10, &reqval)) |
@@ -206,7 +206,7 @@ static ssize_t store_u8(struct device *dev, struct device_attribute *attr, | |||
206 | static ssize_t show_bitmask(struct device *dev, | 206 | static ssize_t show_bitmask(struct device *dev, |
207 | struct device_attribute *attr, char *buf) | 207 | struct device_attribute *attr, char *buf) |
208 | { | 208 | { |
209 | SETUP_SHOW_data_param(dev, attr); | 209 | SETUP_SHOW_DATA_PARAM(dev, attr); |
210 | 210 | ||
211 | return sprintf(buf, "%u\n", | 211 | return sprintf(buf, "%u\n", |
212 | (data->reg[param->msb[0]] >> param-> | 212 | (data->reg[param->msb[0]] >> param-> |
@@ -217,7 +217,7 @@ static ssize_t store_bitmask(struct device *dev, | |||
217 | struct device_attribute *attr, | 217 | struct device_attribute *attr, |
218 | const char *buf, size_t count) | 218 | const char *buf, size_t count) |
219 | { | 219 | { |
220 | SETUP_STORE_data_param(dev, attr); | 220 | SETUP_STORE_DATA_PARAM(dev, attr); |
221 | long reqval; | 221 | long reqval; |
222 | u8 currval; | 222 | u8 currval; |
223 | 223 | ||
@@ -246,7 +246,7 @@ static ssize_t store_bitmask(struct device *dev, | |||
246 | static ssize_t show_fan16(struct device *dev, | 246 | static ssize_t show_fan16(struct device *dev, |
247 | struct device_attribute *attr, char *buf) | 247 | struct device_attribute *attr, char *buf) |
248 | { | 248 | { |
249 | SETUP_SHOW_data_param(dev, attr); | 249 | SETUP_SHOW_DATA_PARAM(dev, attr); |
250 | u16 regval; | 250 | u16 regval; |
251 | 251 | ||
252 | mutex_lock(&data->update_lock); | 252 | mutex_lock(&data->update_lock); |
@@ -262,7 +262,7 @@ static ssize_t store_fan16(struct device *dev, | |||
262 | struct device_attribute *attr, const char *buf, | 262 | struct device_attribute *attr, const char *buf, |
263 | size_t count) | 263 | size_t count) |
264 | { | 264 | { |
265 | SETUP_STORE_data_param(dev, attr); | 265 | SETUP_STORE_DATA_PARAM(dev, attr); |
266 | long reqval; | 266 | long reqval; |
267 | 267 | ||
268 | if (kstrtol(buf, 10, &reqval)) | 268 | if (kstrtol(buf, 10, &reqval)) |
@@ -307,7 +307,7 @@ static int asc7621_in_scaling[] = { | |||
307 | static ssize_t show_in10(struct device *dev, struct device_attribute *attr, | 307 | static ssize_t show_in10(struct device *dev, struct device_attribute *attr, |
308 | char *buf) | 308 | char *buf) |
309 | { | 309 | { |
310 | SETUP_SHOW_data_param(dev, attr); | 310 | SETUP_SHOW_DATA_PARAM(dev, attr); |
311 | u16 regval; | 311 | u16 regval; |
312 | u8 nr = sda->index; | 312 | u8 nr = sda->index; |
313 | 313 | ||
@@ -325,7 +325,7 @@ static ssize_t show_in10(struct device *dev, struct device_attribute *attr, | |||
325 | static ssize_t show_in8(struct device *dev, struct device_attribute *attr, | 325 | static ssize_t show_in8(struct device *dev, struct device_attribute *attr, |
326 | char *buf) | 326 | char *buf) |
327 | { | 327 | { |
328 | SETUP_SHOW_data_param(dev, attr); | 328 | SETUP_SHOW_DATA_PARAM(dev, attr); |
329 | u8 nr = sda->index; | 329 | u8 nr = sda->index; |
330 | 330 | ||
331 | return sprintf(buf, "%u\n", | 331 | return sprintf(buf, "%u\n", |
@@ -336,7 +336,7 @@ static ssize_t show_in8(struct device *dev, struct device_attribute *attr, | |||
336 | static ssize_t store_in8(struct device *dev, struct device_attribute *attr, | 336 | static ssize_t store_in8(struct device *dev, struct device_attribute *attr, |
337 | const char *buf, size_t count) | 337 | const char *buf, size_t count) |
338 | { | 338 | { |
339 | SETUP_STORE_data_param(dev, attr); | 339 | SETUP_STORE_DATA_PARAM(dev, attr); |
340 | long reqval; | 340 | long reqval; |
341 | u8 nr = sda->index; | 341 | u8 nr = sda->index; |
342 | 342 | ||
@@ -360,7 +360,7 @@ static ssize_t store_in8(struct device *dev, struct device_attribute *attr, | |||
360 | static ssize_t show_temp8(struct device *dev, | 360 | static ssize_t show_temp8(struct device *dev, |
361 | struct device_attribute *attr, char *buf) | 361 | struct device_attribute *attr, char *buf) |
362 | { | 362 | { |
363 | SETUP_SHOW_data_param(dev, attr); | 363 | SETUP_SHOW_DATA_PARAM(dev, attr); |
364 | 364 | ||
365 | return sprintf(buf, "%d\n", ((s8) data->reg[param->msb[0]]) * 1000); | 365 | return sprintf(buf, "%d\n", ((s8) data->reg[param->msb[0]]) * 1000); |
366 | } | 366 | } |
@@ -369,7 +369,7 @@ static ssize_t store_temp8(struct device *dev, | |||
369 | struct device_attribute *attr, const char *buf, | 369 | struct device_attribute *attr, const char *buf, |
370 | size_t count) | 370 | size_t count) |
371 | { | 371 | { |
372 | SETUP_STORE_data_param(dev, attr); | 372 | SETUP_STORE_DATA_PARAM(dev, attr); |
373 | long reqval; | 373 | long reqval; |
374 | s8 temp; | 374 | s8 temp; |
375 | 375 | ||
@@ -397,7 +397,7 @@ static ssize_t store_temp8(struct device *dev, | |||
397 | static ssize_t show_temp10(struct device *dev, | 397 | static ssize_t show_temp10(struct device *dev, |
398 | struct device_attribute *attr, char *buf) | 398 | struct device_attribute *attr, char *buf) |
399 | { | 399 | { |
400 | SETUP_SHOW_data_param(dev, attr); | 400 | SETUP_SHOW_DATA_PARAM(dev, attr); |
401 | u8 msb, lsb; | 401 | u8 msb, lsb; |
402 | int temp; | 402 | int temp; |
403 | 403 | ||
@@ -414,7 +414,7 @@ static ssize_t show_temp10(struct device *dev, | |||
414 | static ssize_t show_temp62(struct device *dev, | 414 | static ssize_t show_temp62(struct device *dev, |
415 | struct device_attribute *attr, char *buf) | 415 | struct device_attribute *attr, char *buf) |
416 | { | 416 | { |
417 | SETUP_SHOW_data_param(dev, attr); | 417 | SETUP_SHOW_DATA_PARAM(dev, attr); |
418 | u8 regval = data->reg[param->msb[0]]; | 418 | u8 regval = data->reg[param->msb[0]]; |
419 | int temp = ((s8) (regval & 0xfc) * 1000) + ((regval & 0x03) * 250); | 419 | int temp = ((s8) (regval & 0xfc) * 1000) + ((regval & 0x03) * 250); |
420 | 420 | ||
@@ -425,7 +425,7 @@ static ssize_t store_temp62(struct device *dev, | |||
425 | struct device_attribute *attr, const char *buf, | 425 | struct device_attribute *attr, const char *buf, |
426 | size_t count) | 426 | size_t count) |
427 | { | 427 | { |
428 | SETUP_STORE_data_param(dev, attr); | 428 | SETUP_STORE_DATA_PARAM(dev, attr); |
429 | long reqval, i, f; | 429 | long reqval, i, f; |
430 | s8 temp; | 430 | s8 temp; |
431 | 431 | ||
@@ -459,7 +459,7 @@ static u32 asc7621_range_map[] = { | |||
459 | static ssize_t show_ap2_temp(struct device *dev, | 459 | static ssize_t show_ap2_temp(struct device *dev, |
460 | struct device_attribute *attr, char *buf) | 460 | struct device_attribute *attr, char *buf) |
461 | { | 461 | { |
462 | SETUP_SHOW_data_param(dev, attr); | 462 | SETUP_SHOW_DATA_PARAM(dev, attr); |
463 | long auto_point1; | 463 | long auto_point1; |
464 | u8 regval; | 464 | u8 regval; |
465 | int temp; | 465 | int temp; |
@@ -479,7 +479,7 @@ static ssize_t store_ap2_temp(struct device *dev, | |||
479 | struct device_attribute *attr, | 479 | struct device_attribute *attr, |
480 | const char *buf, size_t count) | 480 | const char *buf, size_t count) |
481 | { | 481 | { |
482 | SETUP_STORE_data_param(dev, attr); | 482 | SETUP_STORE_DATA_PARAM(dev, attr); |
483 | long reqval, auto_point1; | 483 | long reqval, auto_point1; |
484 | int i; | 484 | int i; |
485 | u8 currval, newval = 0; | 485 | u8 currval, newval = 0; |
@@ -510,7 +510,7 @@ static ssize_t store_ap2_temp(struct device *dev, | |||
510 | static ssize_t show_pwm_ac(struct device *dev, | 510 | static ssize_t show_pwm_ac(struct device *dev, |
511 | struct device_attribute *attr, char *buf) | 511 | struct device_attribute *attr, char *buf) |
512 | { | 512 | { |
513 | SETUP_SHOW_data_param(dev, attr); | 513 | SETUP_SHOW_DATA_PARAM(dev, attr); |
514 | u8 config, altbit, regval; | 514 | u8 config, altbit, regval; |
515 | u8 map[] = { | 515 | u8 map[] = { |
516 | 0x01, 0x02, 0x04, 0x1f, 0x00, 0x06, 0x07, 0x10, | 516 | 0x01, 0x02, 0x04, 0x1f, 0x00, 0x06, 0x07, 0x10, |
@@ -530,7 +530,7 @@ static ssize_t store_pwm_ac(struct device *dev, | |||
530 | struct device_attribute *attr, | 530 | struct device_attribute *attr, |
531 | const char *buf, size_t count) | 531 | const char *buf, size_t count) |
532 | { | 532 | { |
533 | SETUP_STORE_data_param(dev, attr); | 533 | SETUP_STORE_DATA_PARAM(dev, attr); |
534 | unsigned long reqval; | 534 | unsigned long reqval; |
535 | u8 currval, config, altbit, newval; | 535 | u8 currval, config, altbit, newval; |
536 | u16 map[] = { | 536 | u16 map[] = { |
@@ -569,7 +569,7 @@ static ssize_t store_pwm_ac(struct device *dev, | |||
569 | static ssize_t show_pwm_enable(struct device *dev, | 569 | static ssize_t show_pwm_enable(struct device *dev, |
570 | struct device_attribute *attr, char *buf) | 570 | struct device_attribute *attr, char *buf) |
571 | { | 571 | { |
572 | SETUP_SHOW_data_param(dev, attr); | 572 | SETUP_SHOW_DATA_PARAM(dev, attr); |
573 | u8 config, altbit, minoff, val, newval; | 573 | u8 config, altbit, minoff, val, newval; |
574 | 574 | ||
575 | mutex_lock(&data->update_lock); | 575 | mutex_lock(&data->update_lock); |
@@ -599,7 +599,7 @@ static ssize_t store_pwm_enable(struct device *dev, | |||
599 | struct device_attribute *attr, | 599 | struct device_attribute *attr, |
600 | const char *buf, size_t count) | 600 | const char *buf, size_t count) |
601 | { | 601 | { |
602 | SETUP_STORE_data_param(dev, attr); | 602 | SETUP_STORE_DATA_PARAM(dev, attr); |
603 | long reqval; | 603 | long reqval; |
604 | u8 currval, config, altbit, newval, minoff = 255; | 604 | u8 currval, config, altbit, newval, minoff = 255; |
605 | 605 | ||
@@ -659,7 +659,7 @@ static u32 asc7621_pwm_freq_map[] = { | |||
659 | static ssize_t show_pwm_freq(struct device *dev, | 659 | static ssize_t show_pwm_freq(struct device *dev, |
660 | struct device_attribute *attr, char *buf) | 660 | struct device_attribute *attr, char *buf) |
661 | { | 661 | { |
662 | SETUP_SHOW_data_param(dev, attr); | 662 | SETUP_SHOW_DATA_PARAM(dev, attr); |
663 | u8 regval = | 663 | u8 regval = |
664 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; | 664 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; |
665 | 665 | ||
@@ -672,7 +672,7 @@ static ssize_t store_pwm_freq(struct device *dev, | |||
672 | struct device_attribute *attr, | 672 | struct device_attribute *attr, |
673 | const char *buf, size_t count) | 673 | const char *buf, size_t count) |
674 | { | 674 | { |
675 | SETUP_STORE_data_param(dev, attr); | 675 | SETUP_STORE_DATA_PARAM(dev, attr); |
676 | unsigned long reqval; | 676 | unsigned long reqval; |
677 | u8 currval, newval = 255; | 677 | u8 currval, newval = 255; |
678 | int i; | 678 | int i; |
@@ -707,7 +707,7 @@ static u32 asc7621_pwm_auto_spinup_map[] = { | |||
707 | static ssize_t show_pwm_ast(struct device *dev, | 707 | static ssize_t show_pwm_ast(struct device *dev, |
708 | struct device_attribute *attr, char *buf) | 708 | struct device_attribute *attr, char *buf) |
709 | { | 709 | { |
710 | SETUP_SHOW_data_param(dev, attr); | 710 | SETUP_SHOW_DATA_PARAM(dev, attr); |
711 | u8 regval = | 711 | u8 regval = |
712 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; | 712 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; |
713 | 713 | ||
@@ -721,7 +721,7 @@ static ssize_t store_pwm_ast(struct device *dev, | |||
721 | struct device_attribute *attr, | 721 | struct device_attribute *attr, |
722 | const char *buf, size_t count) | 722 | const char *buf, size_t count) |
723 | { | 723 | { |
724 | SETUP_STORE_data_param(dev, attr); | 724 | SETUP_STORE_DATA_PARAM(dev, attr); |
725 | long reqval; | 725 | long reqval; |
726 | u8 currval, newval = 255; | 726 | u8 currval, newval = 255; |
727 | u32 i; | 727 | u32 i; |
@@ -756,7 +756,7 @@ static u32 asc7621_temp_smoothing_time_map[] = { | |||
756 | static ssize_t show_temp_st(struct device *dev, | 756 | static ssize_t show_temp_st(struct device *dev, |
757 | struct device_attribute *attr, char *buf) | 757 | struct device_attribute *attr, char *buf) |
758 | { | 758 | { |
759 | SETUP_SHOW_data_param(dev, attr); | 759 | SETUP_SHOW_DATA_PARAM(dev, attr); |
760 | u8 regval = | 760 | u8 regval = |
761 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; | 761 | (data->reg[param->msb[0]] >> param->shift[0]) & param->mask[0]; |
762 | regval = clamp_val(regval, 0, 7); | 762 | regval = clamp_val(regval, 0, 7); |
@@ -768,7 +768,7 @@ static ssize_t store_temp_st(struct device *dev, | |||
768 | struct device_attribute *attr, | 768 | struct device_attribute *attr, |
769 | const char *buf, size_t count) | 769 | const char *buf, size_t count) |
770 | { | 770 | { |
771 | SETUP_STORE_data_param(dev, attr); | 771 | SETUP_STORE_DATA_PARAM(dev, attr); |
772 | long reqval; | 772 | long reqval; |
773 | u8 currval, newval = 255; | 773 | u8 currval, newval = 255; |
774 | u32 i; | 774 | u32 i; |