i2c: normal_i2c can be made const (remaining drivers)
authorJean Delvare <khali@linux-fr.org>
Sun, 27 Jan 2008 17:14:47 +0000 (18:14 +0100)
committerJean Delvare <khali@hyperion.delvare>
Sun, 27 Jan 2008 17:14:47 +0000 (18:14 +0100)
Signed-off-by: Jean Delvare <khali@linux-fr.org>
13 files changed:
Documentation/i2c/writing-clients
arch/arm/mach-pxa/akita-ioexp.c
drivers/i2c/chips/eeprom.c
drivers/i2c/chips/max6875.c
drivers/i2c/chips/pcf8574.c
drivers/i2c/chips/pcf8575.c
drivers/i2c/chips/pcf8591.c
drivers/macintosh/therm_windtunnel.c
drivers/usb/host/ohci-pnx4008.c
drivers/video/matrox/matroxfb_maven.c
drivers/w1/masters/ds2482.c
sound/soc/codecs/cs4270.c
sound/soc/s3c24xx/neo1973_wm8753.c

index 2c170032bf37432790be70fe2e362ba4146c42b1..bfb0a5520817c5bbe770d35af48c0381b5b6dc6c 100644 (file)
@@ -267,9 +267,9 @@ insmod parameter of the form force_<kind>.
 Fortunately, as a module writer, you just have to define the `normal_i2c' 
 parameter. The complete declaration could look like this:
 
-  /* Scan 0x37, and 0x48 to 0x4f */
-  static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
-                                         0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
+  /* Scan 0x4c to 0x4f */
+  static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, 0x4f,
+                                               I2C_CLIENT_END };
 
   /* Magic definition of all other variables and things */
   I2C_CLIENT_INSMOD;
index 12d2fe0ceff6c8032fc90eab06370f114146d1a6..254892ac30cd929e2487b10f914095b478c78163 100644 (file)
@@ -29,7 +29,7 @@
 #define MAX7310_TIMEOUT  0x04
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x18, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { 0x18, I2C_CLIENT_END };
 
 /* I2C Magic */
 I2C_CLIENT_INSMOD;
index 1a7eeebac506d63b05d8f1c96e98c29040bd5f41..fde297b21ad72b8dc36eddcc2d2e65ae0f5b4954 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/mutex.h>
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
+static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
                                        0x55, 0x56, 0x57, I2C_CLIENT_END };
 
 /* Insmod parameters */
index 64692f666372e374cacfeaedaab1bad5293b3e1f..fb7ea5637ecaef03f3ccdf0338232431da118087 100644 (file)
@@ -34,7 +34,7 @@
 #include <linux/mutex.h>
 
 /* Do not scan - the MAX6875 access method will write to some EEPROM chips */
-static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static const unsigned short normal_i2c[] = { I2C_CLIENT_END };
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_1(max6875);
index 21c6dd69193c21804ab55ced727ff412df9f48ce..b3b830ccf209ec7e0b1aac96f14bc8d5e8797943 100644 (file)
 #include <linux/i2c.h>
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
-                                       0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
-                                       I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = {
+       0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
+       0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
+       I2C_CLIENT_END
+};
 
 /* Insmod parameters */
 I2C_CLIENT_INSMOD_2(pcf8574, pcf8574a);
index db3c87726978f5e00b1fd3e066135fac0421924a..3ea08ac0bfa33a1720f362775baf6fc37e582ef9 100644 (file)
@@ -33,7 +33,7 @@
 #include <linux/sysfs.h> /* sysfs_create_group() */
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = {
+static const unsigned short normal_i2c[] = {
        0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
        I2C_CLIENT_END
 };
index 4dc36376eb3267f5b702b33ccdc80f0a5a7d926d..865f4409c06bd343ee3c5f66b8595a17170a9318 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/mutex.h>
 
 /* Addresses to scan */
-static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
+static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
                                        0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
 
 /* Insmod parameters */
index 5452da1bb1a5ab1cbf72a148fb81413f79734928..7c57e7a4e00fc64842f22d200e376b3d365fcee6 100644 (file)
@@ -52,7 +52,7 @@
 static int                     do_probe( struct i2c_adapter *adapter, int addr, int kind);
 
 /* scan 0x48-0x4f (DS1775) and 0x2c-2x2f (ADM1030) */
-static unsigned short          normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
+static const unsigned short    normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
                                                 0x4c, 0x4d, 0x4e, 0x4f,
                                                 0x2c, 0x2d, 0x2e, 0x2f,
                                                 I2C_CLIENT_END };
index ca2a6abbc1172e21ab2924920268894f5566dd1e..642733d091faa1140ae4b37b8b71b2576ed1baa9 100644 (file)
@@ -112,9 +112,9 @@ static int isp1301_detach(struct i2c_client *client);
 static int isp1301_command(struct i2c_client *client, unsigned int cmd,
                           void *arg);
 
-static unsigned short normal_i2c[] =
+static const unsigned short normal_i2c[] =
     { ISP1301_I2C_ADDR, ISP1301_I2C_ADDR + 1, I2C_CLIENT_END };
-static unsigned short dummy_i2c_addrlist[] = { I2C_CLIENT_END };
+static const unsigned short dummy_i2c_addrlist[] = { I2C_CLIENT_END };
 
 static struct i2c_client_address_data addr_data = {
        .normal_i2c = normal_i2c,
index 49cd53e46c0acacee1e588ed77e192ad841139a3..0cd58f84fb464170ada3264bfca5500e1dc634c9 100644 (file)
@@ -1232,7 +1232,7 @@ static int maven_shutdown_client(struct i2c_client* clnt) {
        return 0;
 }
 
-static unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END };
 I2C_CLIENT_INSMOD;
 
 static struct i2c_driver maven_driver;
index d93eb626b2f0ecbb070e5a0302d8c7a774690c3c..0fd5820d5c6105a18ea99f0a4daf9c74f2c0dfcc 100644 (file)
@@ -29,7 +29,7 @@
  * However, the chip cannot be detected without doing an i2c write,
  * so use the force module parameter.
  */
-static unsigned short normal_i2c[] = {I2C_CLIENT_END};
+static const unsigned short normal_i2c[] = { I2C_CLIENT_END };
 
 /**
  * Insmod parameters
index abac62866da80e2db722d6ddb7937119a7124caa..dab22cc97ead840411f67e4ab499610396f922c0 100644 (file)
@@ -234,7 +234,7 @@ static int cs4270_set_dai_fmt(struct snd_soc_codec_dai *codec_dai,
  * lower three bits are determined via the AD2, AD1, and AD0 pins
  * (respectively).
  */
-static unsigned short normal_i2c[] = {
+static const unsigned short normal_i2c[] = {
        0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, I2C_CLIENT_END
 };
 I2C_CLIENT_INSMOD;
index d5a8fc2cf8d690f8dd5a6eb63c3c43293393ae3d..f1f6b9478af95d00480c2c814b9434bed98561e0 100644 (file)
@@ -573,7 +573,7 @@ static struct snd_soc_device neo1973_snd_devdata = {
 
 static struct i2c_client client_template;
 
-static unsigned short normal_i2c[] = { 0x7C, I2C_CLIENT_END };
+static const unsigned short normal_i2c[] = { 0x7C, I2C_CLIENT_END };
 
 /* Magic definition of all other variables and things */
 I2C_CLIENT_INSMOD;