Commit 25e9c86d5a6d82ea45eb680fc66bf73ac5e50dff

Authored by Mark M. Hoffman
1 parent 57df46d6d9

hwmon: normal_i2c arrays should be const

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>

Showing 41 changed files with 55 additions and 60 deletions Side-by-side Diff

drivers/hwmon/ad7418.c
... ... @@ -26,7 +26,7 @@
26 26 #define DRV_VERSION "0.3"
27 27  
28 28 /* Addresses to scan */
29   -static unsigned short normal_i2c[] = { 0x28, I2C_CLIENT_END };
  29 +static const unsigned short normal_i2c[] = { 0x28, I2C_CLIENT_END };
30 30 /* Insmod parameters */
31 31 I2C_CLIENT_INSMOD_3(ad7416, ad7417, ad7418);
32 32  
drivers/hwmon/adm1021.c
... ... @@ -31,10 +31,8 @@
31 31  
32 32  
33 33 /* Addresses to scan */
34   -static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
35   - 0x29, 0x2a, 0x2b,
36   - 0x4c, 0x4d, 0x4e,
37   - I2C_CLIENT_END };
  34 +static const unsigned short normal_i2c[] = {
  35 + 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
38 36  
39 37 /* Insmod parameters */
40 38 I2C_CLIENT_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm,
drivers/hwmon/adm1025.c
... ... @@ -62,7 +62,7 @@
62 62 * NE1619 has two possible addresses: 0x2c and 0x2d.
63 63 */
64 64  
65   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  65 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
66 66  
67 67 /*
68 68 * Insmod parameters
drivers/hwmon/adm1026.c
... ... @@ -35,7 +35,7 @@
35 35 #include <linux/mutex.h>
36 36  
37 37 /* Addresses to scan */
38   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  38 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
39 39  
40 40 /* Insmod parameters */
41 41 I2C_CLIENT_INSMOD_1(adm1026);
drivers/hwmon/adm1029.c
... ... @@ -39,10 +39,8 @@
39 39 * Addresses to scan
40 40 */
41 41  
42   -static unsigned short normal_i2c[] = {
43   - 0x28, 0x29, 0x2a,
44   - 0x2b, 0x2c, 0x2d,
45   - 0x2e, 0x2f, I2C_CLIENT_END
  42 +static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
  43 + 0x2e, 0x2f, I2C_CLIENT_END
46 44 };
47 45  
48 46 /*
drivers/hwmon/adm1031.c
... ... @@ -61,7 +61,7 @@
61 61 #define ADM1031_CONF2_TEMP_ENABLE(chan) (0x10 << (chan))
62 62  
63 63 /* Addresses to scan */
64   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  64 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
65 65  
66 66 /* Insmod parameters */
67 67 I2C_CLIENT_INSMOD_2(adm1030, adm1031);
drivers/hwmon/adm9240.c
... ... @@ -52,7 +52,7 @@
52 52 #include <linux/mutex.h>
53 53  
54 54 /* Addresses to scan */
55   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
  55 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
56 56 I2C_CLIENT_END };
57 57  
58 58 /* Insmod parameters */
drivers/hwmon/ads7828.c
... ... @@ -44,7 +44,7 @@
44 44 #define ADS7828_INT_VREF_MV 2500 /* Internal vref is 2.5V, 2500mV */
45 45  
46 46 /* Addresses to scan */
47   -static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
  47 +static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
48 48 I2C_CLIENT_END };
49 49  
50 50 /* Insmod parameters */
drivers/hwmon/adt7470.c
... ... @@ -30,7 +30,7 @@
30 30 #include <linux/log2.h>
31 31  
32 32 /* Addresses to scan */
33   -static unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
  33 +static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
34 34  
35 35 /* Insmod parameters */
36 36 I2C_CLIENT_INSMOD_1(adt7470);
drivers/hwmon/adt7473.c
... ... @@ -30,7 +30,7 @@
30 30 #include <linux/log2.h>
31 31  
32 32 /* Addresses to scan */
33   -static unsigned short normal_i2c[] = { 0x2C, 0x2D, 0x2E, I2C_CLIENT_END };
  33 +static const unsigned short normal_i2c[] = { 0x2C, 0x2D, 0x2E, I2C_CLIENT_END };
34 34  
35 35 /* Insmod parameters */
36 36 I2C_CLIENT_INSMOD_1(adt7473);
drivers/hwmon/asb100.c
... ... @@ -49,7 +49,7 @@
49 49 #include "lm75.h"
50 50  
51 51 /* I2C addresses to scan */
52   -static unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
  52 +static const unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
53 53  
54 54 /* Insmod parameters */
55 55 I2C_CLIENT_INSMOD_1(asb100);
drivers/hwmon/atxp1.c
... ... @@ -42,7 +42,7 @@
42 42 #define ATXP1_VIDMASK 0x1f
43 43 #define ATXP1_GPIO1MASK 0x0f
44 44  
45   -static unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END };
  45 +static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END };
46 46  
47 47 I2C_CLIENT_INSMOD_1(atxp1);
48 48  
drivers/hwmon/dme1737.c
... ... @@ -49,7 +49,7 @@
49 49 MODULE_PARM_DESC(force_id, "Override the detected device ID");
50 50  
51 51 /* Addresses to scan */
52   -static unsigned short normal_i2c[] = {0x2c, 0x2d, 0x2e, I2C_CLIENT_END};
  52 +static const unsigned short normal_i2c[] = {0x2c, 0x2d, 0x2e, I2C_CLIENT_END};
53 53  
54 54 /* Insmod parameters */
55 55 I2C_CLIENT_INSMOD_1(dme1737);
drivers/hwmon/ds1621.c
... ... @@ -34,7 +34,7 @@
34 34 #include "lm75.h"
35 35  
36 36 /* Addresses to scan */
37   -static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
  37 +static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
38 38 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
39 39  
40 40 /* Insmod parameters */
drivers/hwmon/f75375s.c
... ... @@ -37,7 +37,7 @@
37 37 #include <linux/f75375s.h>
38 38  
39 39 /* Addresses to scan */
40   -static unsigned short normal_i2c[] = { 0x2d, 0x2e, I2C_CLIENT_END };
  40 +static const unsigned short normal_i2c[] = { 0x2d, 0x2e, I2C_CLIENT_END };
41 41  
42 42 /* Insmod parameters */
43 43 I2C_CLIENT_INSMOD_2(f75373, f75375);
drivers/hwmon/fscher.c
... ... @@ -40,7 +40,7 @@
40 40 * Addresses to scan
41 41 */
42 42  
43   -static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
  43 +static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
44 44  
45 45 /*
46 46 * Insmod parameters
drivers/hwmon/fschmd.c
... ... @@ -44,7 +44,7 @@
44 44 #include <linux/dmi.h>
45 45  
46 46 /* Addresses to scan */
47   -static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
  47 +static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
48 48  
49 49 /* Insmod parameters */
50 50 I2C_CLIENT_INSMOD_5(fscpos, fscher, fscscy, fschrc, fschmd);
drivers/hwmon/fscpos.c
... ... @@ -43,7 +43,7 @@
43 43 /*
44 44 * Addresses to scan
45 45 */
46   -static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
  46 +static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
47 47  
48 48 /*
49 49 * Insmod parameters
drivers/hwmon/gl518sm.c
... ... @@ -44,7 +44,7 @@
44 44 #include <linux/sysfs.h>
45 45  
46 46 /* Addresses to scan */
47   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
  47 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
48 48  
49 49 /* Insmod parameters */
50 50 I2C_CLIENT_INSMOD_2(gl518sm_r00, gl518sm_r80);
drivers/hwmon/gl520sm.c
... ... @@ -39,7 +39,7 @@
39 39 MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=temperature, 2=voltage)");
40 40  
41 41 /* Addresses to scan */
42   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
  42 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
43 43  
44 44 /* Insmod parameters */
45 45 I2C_CLIENT_INSMOD_1(gl520sm);
drivers/hwmon/lm63.c
... ... @@ -53,7 +53,7 @@
53 53 * Address is fully defined internally and cannot be changed.
54 54 */
55 55  
56   -static unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };
  56 +static const unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };
57 57  
58 58 /*
59 59 * Insmod parameters
drivers/hwmon/lm75.c
... ... @@ -31,7 +31,7 @@
31 31  
32 32  
33 33 /* Addresses to scan */
34   -static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
  34 +static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
35 35 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
36 36  
37 37 /* Insmod parameters */
drivers/hwmon/lm77.c
... ... @@ -36,7 +36,8 @@
36 36 #include <linux/mutex.h>
37 37  
38 38 /* Addresses to scan */
39   -static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, I2C_CLIENT_END };
  39 +static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
  40 + I2C_CLIENT_END };
40 41  
41 42 /* Insmod parameters */
42 43 I2C_CLIENT_INSMOD_1(lm77);
drivers/hwmon/lm78.c
... ... @@ -37,8 +37,8 @@
37 37 static struct platform_device *pdev;
38 38  
39 39 /* Addresses to scan */
40   -static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
41   - 0x2e, 0x2f, I2C_CLIENT_END };
  40 +static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
  41 + 0x2e, 0x2f, I2C_CLIENT_END };
42 42 static unsigned short isa_address = 0x290;
43 43  
44 44 /* Insmod parameters */
drivers/hwmon/lm80.c
... ... @@ -32,8 +32,8 @@
32 32 #include <linux/mutex.h>
33 33  
34 34 /* Addresses to scan */
35   -static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c,
36   - 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
  35 +static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
  36 + 0x2e, 0x2f, I2C_CLIENT_END };
37 37  
38 38 /* Insmod parameters */
39 39 I2C_CLIENT_INSMOD_1(lm80);
drivers/hwmon/lm83.c
... ... @@ -48,10 +48,8 @@
48 48 * addresses.
49 49 */
50 50  
51   -static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
52   - 0x29, 0x2a, 0x2b,
53   - 0x4c, 0x4d, 0x4e,
54   - I2C_CLIENT_END };
  51 +static const unsigned short normal_i2c[] = {
  52 + 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
55 53  
56 54 /*
57 55 * Insmod parameters
drivers/hwmon/lm85.c
... ... @@ -35,7 +35,7 @@
35 35 #include <linux/mutex.h>
36 36  
37 37 /* Addresses to scan */
38   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  38 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
39 39  
40 40 /* Insmod parameters */
41 41 I2C_CLIENT_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
drivers/hwmon/lm87.c
... ... @@ -73,7 +73,7 @@
73 73 * LM87 has three possible addresses: 0x2c, 0x2d and 0x2e.
74 74 */
75 75  
76   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  76 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
77 77  
78 78 /*
79 79 * Insmod parameters
drivers/hwmon/lm90.c
... ... @@ -101,10 +101,8 @@
101 101 * 0x4c, 0x4d or 0x4e.
102 102 */
103 103  
104   -static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
105   - 0x29, 0x2a, 0x2b,
106   - 0x4c, 0x4d, 0x4e,
107   - I2C_CLIENT_END };
  104 +static const unsigned short normal_i2c[] = {
  105 + 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
108 106  
109 107 /*
110 108 * Insmod parameters
drivers/hwmon/lm92.c
... ... @@ -51,8 +51,8 @@
51 51  
52 52 /* The LM92 and MAX6635 have 2 two-state pins for address selection,
53 53 resulting in 4 possible addresses. */
54   -static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
55   - I2C_CLIENT_END };
  54 +static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
  55 + I2C_CLIENT_END };
56 56  
57 57 /* Insmod parameters */
58 58 I2C_CLIENT_INSMOD_1(lm92);
drivers/hwmon/lm93.c
... ... @@ -142,7 +142,7 @@
142 142 I2C_FUNC_SMBUS_WORD_DATA)
143 143  
144 144 /* Addresses to scan */
145   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  145 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
146 146  
147 147 /* Insmod parameters */
148 148 I2C_CLIENT_INSMOD_1(lm93);
drivers/hwmon/max1619.c
... ... @@ -37,10 +37,8 @@
37 37 #include <linux/mutex.h>
38 38 #include <linux/sysfs.h>
39 39  
40   -static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
41   - 0x29, 0x2a, 0x2b,
42   - 0x4c, 0x4d, 0x4e,
43   - I2C_CLIENT_END };
  40 +static const unsigned short normal_i2c[] = {
  41 + 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
44 42  
45 43 /*
46 44 * Insmod parameters
drivers/hwmon/max6650.c
... ... @@ -44,7 +44,8 @@
44 44 * Addresses to scan. There are four disjoint possibilities, by pin config.
45 45 */
46 46  
47   -static unsigned short normal_i2c[] = {0x1b, 0x1f, 0x48, 0x4b, I2C_CLIENT_END};
  47 +static const unsigned short normal_i2c[] = {0x1b, 0x1f, 0x48, 0x4b,
  48 + I2C_CLIENT_END};
48 49  
49 50 /*
50 51 * Insmod parameters
drivers/hwmon/smsc47m192.c
... ... @@ -34,7 +34,7 @@
34 34 #include <linux/mutex.h>
35 35  
36 36 /* Addresses to scan */
37   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
  37 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
38 38  
39 39 /* Insmod parameters */
40 40 I2C_CLIENT_INSMOD_1(smsc47m192);
drivers/hwmon/thmc50.c
... ... @@ -32,7 +32,7 @@
32 32 MODULE_LICENSE("GPL");
33 33  
34 34 /* Addresses to scan */
35   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
  35 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
36 36  
37 37 /* Insmod parameters */
38 38 I2C_CLIENT_INSMOD_2(thmc50, adm1022);
drivers/hwmon/w83781d.c
... ... @@ -53,8 +53,8 @@
53 53 static struct platform_device *pdev;
54 54  
55 55 /* Addresses to scan */
56   -static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
57   - 0x2e, 0x2f, I2C_CLIENT_END };
  56 +static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
  57 + 0x2e, 0x2f, I2C_CLIENT_END };
58 58 static unsigned short isa_address = 0x290;
59 59  
60 60 /* Insmod parameters */
drivers/hwmon/w83791d.c
... ... @@ -47,7 +47,8 @@
47 47 #define NUMBER_OF_TEMPIN 3
48 48  
49 49 /* Addresses to scan */
50   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
  50 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
  51 + I2C_CLIENT_END };
51 52  
52 53 /* Insmod parameters */
53 54 I2C_CLIENT_INSMOD_1(w83791d);
drivers/hwmon/w83792d.c
... ... @@ -46,7 +46,8 @@
46 46 #include <linux/sysfs.h>
47 47  
48 48 /* Addresses to scan */
49   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
  49 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
  50 + I2C_CLIENT_END };
50 51  
51 52 /* Insmod parameters */
52 53 I2C_CLIENT_INSMOD_1(w83792d);
drivers/hwmon/w83793.c
... ... @@ -37,7 +37,8 @@
37 37 #include <linux/mutex.h>
38 38  
39 39 /* Addresses to scan */
40   -static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
  40 +static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
  41 + I2C_CLIENT_END };
41 42  
42 43 /* Insmod parameters */
43 44 I2C_CLIENT_INSMOD_1(w83793);
drivers/hwmon/w83l785ts.c
... ... @@ -49,7 +49,7 @@
49 49 * Address is fully defined internally and cannot be changed.
50 50 */
51 51  
52   -static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
  52 +static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
53 53  
54 54 /*
55 55 * Insmod parameters
drivers/hwmon/w83l786ng.c
... ... @@ -35,7 +35,7 @@
35 35 #include <linux/mutex.h>
36 36  
37 37 /* Addresses to scan */
38   -static unsigned short normal_i2c[] = { 0x2e, 0x2f, I2C_CLIENT_END };
  38 +static const unsigned short normal_i2c[] = { 0x2e, 0x2f, I2C_CLIENT_END };
39 39  
40 40 /* Insmod parameters */
41 41 I2C_CLIENT_INSMOD_1(w83l786ng);