diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-07-15 07:15:01 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2014-08-04 10:01:38 -0400 |
commit | 7a7176aa4bf49685ddbef9adbdaf7383dc62ceed (patch) | |
tree | e97fed887d4f11d2fb3a37e450429614d4a90231 | |
parent | f073b9942731cbef167b8a6d6bacc80370fddf8c (diff) |
hwmon: (asc7621) Make map tables const
Map tables are never changed, so it is safe to make them const.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: George Joseph <george.joseph@fairview5.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/hwmon/asc7621.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c index 71463689d163..c77644d45a02 100644 --- a/drivers/hwmon/asc7621.c +++ b/drivers/hwmon/asc7621.c | |||
@@ -300,7 +300,7 @@ static ssize_t store_fan16(struct device *dev, | |||
300 | * respectively. That doesn't mean that's what the motherboard provides. :) | 300 | * respectively. That doesn't mean that's what the motherboard provides. :) |
301 | */ | 301 | */ |
302 | 302 | ||
303 | static int asc7621_in_scaling[] = { | 303 | static const int asc7621_in_scaling[] = { |
304 | 2500, 2250, 3300, 5000, 12000 | 304 | 2500, 2250, 3300, 5000, 12000 |
305 | }; | 305 | }; |
306 | 306 | ||
@@ -451,7 +451,7 @@ static ssize_t store_temp62(struct device *dev, | |||
451 | * hwmon specs, we synthesize the auto_point_2 from them. | 451 | * hwmon specs, we synthesize the auto_point_2 from them. |
452 | */ | 452 | */ |
453 | 453 | ||
454 | static u32 asc7621_range_map[] = { | 454 | static const u32 asc7621_range_map[] = { |
455 | 2000, 2500, 3330, 4000, 5000, 6670, 8000, 10000, | 455 | 2000, 2500, 3330, 4000, 5000, 6670, 8000, 10000, |
456 | 13330, 16000, 20000, 26670, 32000, 40000, 53330, 80000, | 456 | 13330, 16000, 20000, 26670, 32000, 40000, 53330, 80000, |
457 | }; | 457 | }; |
@@ -512,7 +512,7 @@ static ssize_t show_pwm_ac(struct device *dev, | |||
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 | const u8 map[] = { |
516 | 0x01, 0x02, 0x04, 0x1f, 0x00, 0x06, 0x07, 0x10, | 516 | 0x01, 0x02, 0x04, 0x1f, 0x00, 0x06, 0x07, 0x10, |
517 | 0x08, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f | 517 | 0x08, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f |
518 | }; | 518 | }; |
@@ -533,7 +533,7 @@ static ssize_t store_pwm_ac(struct device *dev, | |||
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 | const u16 map[] = { |
537 | 0x04, 0x00, 0x01, 0xff, 0x02, 0xff, 0x05, 0x06, | 537 | 0x04, 0x00, 0x01, 0xff, 0x02, 0xff, 0x05, 0x06, |
538 | 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, | 538 | 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, |
539 | 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 539 | 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, |
@@ -651,7 +651,7 @@ static ssize_t store_pwm_enable(struct device *dev, | |||
651 | return count; | 651 | return count; |
652 | } | 652 | } |
653 | 653 | ||
654 | static u32 asc7621_pwm_freq_map[] = { | 654 | static const u32 asc7621_pwm_freq_map[] = { |
655 | 10, 15, 23, 30, 38, 47, 62, 94, | 655 | 10, 15, 23, 30, 38, 47, 62, 94, |
656 | 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000 | 656 | 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000 |
657 | }; | 657 | }; |
@@ -700,7 +700,7 @@ static ssize_t store_pwm_freq(struct device *dev, | |||
700 | return count; | 700 | return count; |
701 | } | 701 | } |
702 | 702 | ||
703 | static u32 asc7621_pwm_auto_spinup_map[] = { | 703 | static const u32 asc7621_pwm_auto_spinup_map[] = { |
704 | 0, 100, 250, 400, 700, 1000, 2000, 4000 | 704 | 0, 100, 250, 400, 700, 1000, 2000, 4000 |
705 | }; | 705 | }; |
706 | 706 | ||
@@ -749,7 +749,7 @@ static ssize_t store_pwm_ast(struct device *dev, | |||
749 | return count; | 749 | return count; |
750 | } | 750 | } |
751 | 751 | ||
752 | static u32 asc7621_temp_smoothing_time_map[] = { | 752 | static const u32 asc7621_temp_smoothing_time_map[] = { |
753 | 35000, 17600, 11800, 7000, 4400, 3000, 1600, 800 | 753 | 35000, 17600, 11800, 7000, 4400, 3000, 1600, 800 |
754 | }; | 754 | }; |
755 | 755 | ||