Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Guenter Roeck
7a7176aa f073b994

+7 -7
+7 -7
drivers/hwmon/asc7621.c
··· 300 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 304 2500, 2250, 3300, 5000, 12000 305 305 }; 306 306 ··· 451 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 455 2000, 2500, 3330, 4000, 5000, 6670, 8000, 10000, 456 456 13330, 16000, 20000, 26670, 32000, 40000, 53330, 80000, 457 457 }; ··· 512 512 { 513 513 SETUP_SHOW_DATA_PARAM(dev, attr); 514 514 u8 config, altbit, regval; 515 - u8 map[] = { 515 + const u8 map[] = { 516 516 0x01, 0x02, 0x04, 0x1f, 0x00, 0x06, 0x07, 0x10, 517 517 0x08, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f 518 518 }; ··· 533 533 SETUP_STORE_DATA_PARAM(dev, attr); 534 534 unsigned long reqval; 535 535 u8 currval, config, altbit, newval; 536 - u16 map[] = { 536 + const u16 map[] = { 537 537 0x04, 0x00, 0x01, 0xff, 0x02, 0xff, 0x05, 0x06, 538 538 0x08, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 539 539 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, ··· 651 651 return count; 652 652 } 653 653 654 - static u32 asc7621_pwm_freq_map[] = { 654 + static const u32 asc7621_pwm_freq_map[] = { 655 655 10, 15, 23, 30, 38, 47, 62, 94, 656 656 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000 657 657 }; ··· 700 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 704 0, 100, 250, 400, 700, 1000, 2000, 4000 705 705 }; 706 706 ··· 749 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 753 35000, 17600, 11800, 7000, 4400, 3000, 1600, 800 754 754 }; 755 755