diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-01-27 12:14:47 -0500 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-01-27 12:14:47 -0500 |
commit | 2cdddeb8d7dd42dc1847b110228a626d25a1e468 (patch) | |
tree | b349ef86c00f4fd732266dfe6dea2fd8b74a1c52 | |
parent | 922539a0a3c44e3b8dcf1025910f08e1940ba49f (diff) |
i2c: normal_i2c can be made const (remaining drivers)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r-- | Documentation/i2c/writing-clients | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/akita-ioexp.c | 2 | ||||
-rw-r--r-- | drivers/i2c/chips/eeprom.c | 2 | ||||
-rw-r--r-- | drivers/i2c/chips/max6875.c | 2 | ||||
-rw-r--r-- | drivers/i2c/chips/pcf8574.c | 8 | ||||
-rw-r--r-- | drivers/i2c/chips/pcf8575.c | 2 | ||||
-rw-r--r-- | drivers/i2c/chips/pcf8591.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/therm_windtunnel.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pnx4008.c | 4 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_maven.c | 2 | ||||
-rw-r--r-- | drivers/w1/masters/ds2482.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/cs4270.c | 2 | ||||
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 2 |
13 files changed, 20 insertions, 18 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 2c170032bf37..bfb0a5520817 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -267,9 +267,9 @@ insmod parameter of the form force_<kind>. | |||
267 | Fortunately, as a module writer, you just have to define the `normal_i2c' | 267 | Fortunately, as a module writer, you just have to define the `normal_i2c' |
268 | parameter. The complete declaration could look like this: | 268 | parameter. The complete declaration could look like this: |
269 | 269 | ||
270 | /* Scan 0x37, and 0x48 to 0x4f */ | 270 | /* Scan 0x4c to 0x4f */ |
271 | static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c, | 271 | static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, 0x4f, |
272 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; | 272 | I2C_CLIENT_END }; |
273 | 273 | ||
274 | /* Magic definition of all other variables and things */ | 274 | /* Magic definition of all other variables and things */ |
275 | I2C_CLIENT_INSMOD; | 275 | I2C_CLIENT_INSMOD; |
diff --git a/arch/arm/mach-pxa/akita-ioexp.c b/arch/arm/mach-pxa/akita-ioexp.c index 12d2fe0ceff6..254892ac30cd 100644 --- a/arch/arm/mach-pxa/akita-ioexp.c +++ b/arch/arm/mach-pxa/akita-ioexp.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #define MAX7310_TIMEOUT 0x04 | 29 | #define MAX7310_TIMEOUT 0x04 |
30 | 30 | ||
31 | /* Addresses to scan */ | 31 | /* Addresses to scan */ |
32 | static unsigned short normal_i2c[] = { 0x18, I2C_CLIENT_END }; | 32 | static const unsigned short normal_i2c[] = { 0x18, I2C_CLIENT_END }; |
33 | 33 | ||
34 | /* I2C Magic */ | 34 | /* I2C Magic */ |
35 | I2C_CLIENT_INSMOD; | 35 | I2C_CLIENT_INSMOD; |
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c index 1a7eeebac506..fde297b21ad7 100644 --- a/drivers/i2c/chips/eeprom.c +++ b/drivers/i2c/chips/eeprom.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/mutex.h> | 35 | #include <linux/mutex.h> |
36 | 36 | ||
37 | /* Addresses to scan */ | 37 | /* Addresses to scan */ |
38 | static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, | 38 | static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, |
39 | 0x55, 0x56, 0x57, I2C_CLIENT_END }; | 39 | 0x55, 0x56, 0x57, I2C_CLIENT_END }; |
40 | 40 | ||
41 | /* Insmod parameters */ | 41 | /* Insmod parameters */ |
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c index 64692f666372..fb7ea5637eca 100644 --- a/drivers/i2c/chips/max6875.c +++ b/drivers/i2c/chips/max6875.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | 35 | ||
36 | /* Do not scan - the MAX6875 access method will write to some EEPROM chips */ | 36 | /* Do not scan - the MAX6875 access method will write to some EEPROM chips */ |
37 | static unsigned short normal_i2c[] = {I2C_CLIENT_END}; | 37 | static const unsigned short normal_i2c[] = { I2C_CLIENT_END }; |
38 | 38 | ||
39 | /* Insmod parameters */ | 39 | /* Insmod parameters */ |
40 | I2C_CLIENT_INSMOD_1(max6875); | 40 | I2C_CLIENT_INSMOD_1(max6875); |
diff --git a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c index 21c6dd69193c..b3b830ccf209 100644 --- a/drivers/i2c/chips/pcf8574.c +++ b/drivers/i2c/chips/pcf8574.c | |||
@@ -41,9 +41,11 @@ | |||
41 | #include <linux/i2c.h> | 41 | #include <linux/i2c.h> |
42 | 42 | ||
43 | /* Addresses to scan */ | 43 | /* Addresses to scan */ |
44 | static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, | 44 | static const unsigned short normal_i2c[] = { |
45 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, | 45 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
46 | I2C_CLIENT_END }; | 46 | 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, |
47 | I2C_CLIENT_END | ||
48 | }; | ||
47 | 49 | ||
48 | /* Insmod parameters */ | 50 | /* Insmod parameters */ |
49 | I2C_CLIENT_INSMOD_2(pcf8574, pcf8574a); | 51 | I2C_CLIENT_INSMOD_2(pcf8574, pcf8574a); |
diff --git a/drivers/i2c/chips/pcf8575.c b/drivers/i2c/chips/pcf8575.c index db3c87726978..3ea08ac0bfa3 100644 --- a/drivers/i2c/chips/pcf8575.c +++ b/drivers/i2c/chips/pcf8575.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/sysfs.h> /* sysfs_create_group() */ | 33 | #include <linux/sysfs.h> /* sysfs_create_group() */ |
34 | 34 | ||
35 | /* Addresses to scan */ | 35 | /* Addresses to scan */ |
36 | static unsigned short normal_i2c[] = { | 36 | static const unsigned short normal_i2c[] = { |
37 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, | 37 | 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, |
38 | I2C_CLIENT_END | 38 | I2C_CLIENT_END |
39 | }; | 39 | }; |
diff --git a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c index 4dc36376eb32..865f4409c06b 100644 --- a/drivers/i2c/chips/pcf8591.c +++ b/drivers/i2c/chips/pcf8591.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
28 | 28 | ||
29 | /* Addresses to scan */ | 29 | /* Addresses to scan */ |
30 | static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, | 30 | static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, |
31 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; | 31 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; |
32 | 32 | ||
33 | /* Insmod parameters */ | 33 | /* Insmod parameters */ |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 5452da1bb1a5..7c57e7a4e00f 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
@@ -52,7 +52,7 @@ | |||
52 | static int do_probe( struct i2c_adapter *adapter, int addr, int kind); | 52 | static int do_probe( struct i2c_adapter *adapter, int addr, int kind); |
53 | 53 | ||
54 | /* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ | 54 | /* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */ |
55 | static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, | 55 | static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, |
56 | 0x4c, 0x4d, 0x4e, 0x4f, | 56 | 0x4c, 0x4d, 0x4e, 0x4f, |
57 | 0x2c, 0x2d, 0x2e, 0x2f, | 57 | 0x2c, 0x2d, 0x2e, 0x2f, |
58 | I2C_CLIENT_END }; | 58 | I2C_CLIENT_END }; |
diff --git a/drivers/usb/host/ohci-pnx4008.c b/drivers/usb/host/ohci-pnx4008.c index ca2a6abbc117..642733d091fa 100644 --- a/drivers/usb/host/ohci-pnx4008.c +++ b/drivers/usb/host/ohci-pnx4008.c | |||
@@ -112,9 +112,9 @@ static int isp1301_detach(struct i2c_client *client); | |||
112 | static int isp1301_command(struct i2c_client *client, unsigned int cmd, | 112 | static int isp1301_command(struct i2c_client *client, unsigned int cmd, |
113 | void *arg); | 113 | void *arg); |
114 | 114 | ||
115 | static unsigned short normal_i2c[] = | 115 | static const unsigned short normal_i2c[] = |
116 | { ISP1301_I2C_ADDR, ISP1301_I2C_ADDR + 1, I2C_CLIENT_END }; | 116 | { ISP1301_I2C_ADDR, ISP1301_I2C_ADDR + 1, I2C_CLIENT_END }; |
117 | static unsigned short dummy_i2c_addrlist[] = { I2C_CLIENT_END }; | 117 | static const unsigned short dummy_i2c_addrlist[] = { I2C_CLIENT_END }; |
118 | 118 | ||
119 | static struct i2c_client_address_data addr_data = { | 119 | static struct i2c_client_address_data addr_data = { |
120 | .normal_i2c = normal_i2c, | 120 | .normal_i2c = normal_i2c, |
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 49cd53e46c0a..0cd58f84fb46 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c | |||
@@ -1232,7 +1232,7 @@ static int maven_shutdown_client(struct i2c_client* clnt) { | |||
1232 | return 0; | 1232 | return 0; |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | static unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; | 1235 | static const unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; |
1236 | I2C_CLIENT_INSMOD; | 1236 | I2C_CLIENT_INSMOD; |
1237 | 1237 | ||
1238 | static struct i2c_driver maven_driver; | 1238 | static struct i2c_driver maven_driver; |
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index d93eb626b2f0..0fd5820d5c61 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * However, the chip cannot be detected without doing an i2c write, | 29 | * However, the chip cannot be detected without doing an i2c write, |
30 | * so use the force module parameter. | 30 | * so use the force module parameter. |
31 | */ | 31 | */ |
32 | static unsigned short normal_i2c[] = {I2C_CLIENT_END}; | 32 | static const unsigned short normal_i2c[] = { I2C_CLIENT_END }; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Insmod parameters | 35 | * Insmod parameters |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index abac62866da8..dab22cc97ead 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -234,7 +234,7 @@ static int cs4270_set_dai_fmt(struct snd_soc_codec_dai *codec_dai, | |||
234 | * lower three bits are determined via the AD2, AD1, and AD0 pins | 234 | * lower three bits are determined via the AD2, AD1, and AD0 pins |
235 | * (respectively). | 235 | * (respectively). |
236 | */ | 236 | */ |
237 | static unsigned short normal_i2c[] = { | 237 | static const unsigned short normal_i2c[] = { |
238 | 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, I2C_CLIENT_END | 238 | 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, I2C_CLIENT_END |
239 | }; | 239 | }; |
240 | I2C_CLIENT_INSMOD; | 240 | I2C_CLIENT_INSMOD; |
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index d5a8fc2cf8d6..f1f6b9478af9 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c | |||
@@ -573,7 +573,7 @@ static struct snd_soc_device neo1973_snd_devdata = { | |||
573 | 573 | ||
574 | static struct i2c_client client_template; | 574 | static struct i2c_client client_template; |
575 | 575 | ||
576 | static unsigned short normal_i2c[] = { 0x7C, I2C_CLIENT_END }; | 576 | static const unsigned short normal_i2c[] = { 0x7C, I2C_CLIENT_END }; |
577 | 577 | ||
578 | /* Magic definition of all other variables and things */ | 578 | /* Magic definition of all other variables and things */ |
579 | I2C_CLIENT_INSMOD; | 579 | I2C_CLIENT_INSMOD; |