i2c: Constify i2c_algorithm declarations, part 2
authorJean Delvare <khali@linux-fr.org>
Sun, 3 Sep 2006 20:39:46 +0000 (22:39 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Sep 2006 22:38:52 +0000 (15:38 -0700)
i2c: Constify i2c_algorithm declarations, part 2

Make struct i2c_algorithm declarations const in all i2c bus drivers
where it is possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27 files changed:
drivers/acpi/i2c_ec.c
drivers/i2c/busses/i2c-ali1535.c
drivers/i2c/busses/i2c-ali1563.c
drivers/i2c/busses/i2c-ali15x3.c
drivers/i2c/busses/i2c-amd756.c
drivers/i2c/busses/i2c-amd8111.c
drivers/i2c/busses/i2c-au1550.c
drivers/i2c/busses/i2c-i801.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-iop3xx.c
drivers/i2c/busses/i2c-isa.c
drivers/i2c/busses/i2c-mpc.c
drivers/i2c/busses/i2c-mv64xxx.c
drivers/i2c/busses/i2c-nforce2.c
drivers/i2c/busses/i2c-ocores.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-powermac.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/i2c-sibyte.c
drivers/i2c/busses/i2c-sis5595.c
drivers/i2c/busses/i2c-sis630.c
drivers/i2c/busses/i2c-sis96x.c
drivers/i2c/busses/i2c-stub.c
drivers/i2c/busses/i2c-viapro.c
drivers/i2c/busses/scx200_acb.c

index 6809c283ec5865ed7183570dbe5814fa7e9bf5a4..6342e612c203726514be32d5ab4e97ecf579f552 100644 (file)
@@ -293,7 +293,7 @@ static u32 acpi_ec_smb_func(struct i2c_adapter *adapter)
                I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC);
 }
 
-static struct i2c_algorithm acpi_ec_smbus_algorithm = {
+static const struct i2c_algorithm acpi_ec_smbus_algorithm = {
        .smbus_xfer = acpi_ec_smb_access,
        .functionality = acpi_ec_smb_func,
 };
index d3ef46aeeb3ca5eb5a365d5a507f16146ecaba1b..e75d339a3481e9dcd03acb7dda20d14ba73352ae 100644 (file)
@@ -468,7 +468,7 @@ static u32 ali1535_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_BLOCK_DATA;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = ali1535_access,
        .functionality  = ali1535_func,
 };
index e6f63208fc4a631df15682ed6a32c3c5f68793bd..33fbb47100a36d02a45492cc8233301d66c4b7c1 100644 (file)
@@ -367,7 +367,7 @@ static void ali1563_shutdown(struct pci_dev *dev)
        release_region(ali1563_smba,ALI1563_SMB_IOSIZE);
 }
 
-static struct i2c_algorithm ali1563_algorithm = {
+static const struct i2c_algorithm ali1563_algorithm = {
        .smbus_xfer     = ali1563_access,
        .functionality  = ali1563_func,
 };
index 7a5c0941dbc13f396aaabaf5881f48eb0650761c..3f11b6e1a3418c5bc5dad86681b7eae67c429af7 100644 (file)
@@ -463,7 +463,7 @@ static u32 ali15x3_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_BLOCK_DATA;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = ali15x3_access,
        .functionality  = ali15x3_func,
 };
index 1750dedaf4b5620a553455778efd62d3bf9ca2fd..2d21afdc5b1cc7f3961c3e4f480de0444ec4292f 100644 (file)
@@ -294,7 +294,7 @@ static u32 amd756_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_PROC_CALL;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = amd756_access,
        .functionality  = amd756_func,
 };
index e5ef560e686ae8c5f8bdab1b8a2d38e0d90e933f..0fbc7186c91ab63f8ac8f6b32365db3a850efc6f 100644 (file)
@@ -316,7 +316,7 @@ static u32 amd8111_func(struct i2c_adapter *adapter)
                I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer = amd8111_access,
        .functionality = amd8111_func,
 };
index 7a005ddfb11e2903e8457d5d4517f9e6bc6e64f0..d7e7c359fc364831a9ad1a0bed6001f2e88d9b41 100644 (file)
@@ -287,7 +287,7 @@ au1550_func(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm au1550_algo = {
+static const struct i2c_algorithm au1550_algo = {
        .master_xfer    = au1550_xfer,
        .functionality  = au1550_func,
 };
index 7be1d0a3e8f8f59856562013e1b6361d569c6510..bbb2fbee836fe45c855dfef454a66cecd560b213 100644 (file)
@@ -434,7 +434,7 @@ static u32 i801_func(struct i2c_adapter *adapter)
             | (isich4 ? I2C_FUNC_SMBUS_HWPEC_CALC : 0);
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = i801_access,
        .functionality  = i801_func,
 };
index 0599bbd65d93b196fd946b1f270b89af48932730..5bccb5d68318b6ea5fdfc0387a3136138d8bb20b 100644 (file)
@@ -625,7 +625,7 @@ static u32 iic_func(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
 }
 
-static struct i2c_algorithm iic_algo = {
+static const struct i2c_algorithm iic_algo = {
        .master_xfer    = iic_xfer,
        .functionality  = iic_func
 };
index 48c56939c8619abaae4e6289fb86cd2856d03921..8e413150af37d1c11e8a647fbe6719132176e3da 100644 (file)
@@ -401,7 +401,7 @@ iop3xx_i2c_func(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm iop3xx_i2c_algo = {
+static const struct i2c_algorithm iop3xx_i2c_algo = {
        .master_xfer    = iop3xx_i2c_master_xfer,
        .algo_control   = iop3xx_i2c_algo_control,
        .functionality  = iop3xx_i2c_func,
index 7a8d2c148a801c546b306c3e73a92ea02cd450a6..4380653748a4c155065bb057148f91e1e1b7eddd 100644 (file)
@@ -43,7 +43,7 @@
 static u32 isa_func(struct i2c_adapter *adapter);
 
 /* This is the actual algorithm we define */
-static struct i2c_algorithm isa_algorithm = {
+static const struct i2c_algorithm isa_algorithm = {
        .functionality  = isa_func,
 };
 
index 377ab40944b8d3cbecfc02ab3c0fe1fb7673ec7c..155a986de516616d2ed5d70074cb28240a1878dd 100644 (file)
@@ -272,7 +272,7 @@ static u32 mpc_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm mpc_algo = {
+static const struct i2c_algorithm mpc_algo = {
        .master_xfer = mpc_xfer,
        .functionality = mpc_functionality,
 };
index ac5cde1bbd2ba24333d2360ce3b253d60a3426c8..eacbaf745b64527798c74fc5ddd48acdbd8e11b6 100644 (file)
@@ -431,7 +431,7 @@ mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
        return num;
 }
 
-static struct i2c_algorithm mv64xxx_i2c_algo = {
+static const struct i2c_algorithm mv64xxx_i2c_algo = {
        .master_xfer = mv64xxx_i2c_xfer,
        .functionality = mv64xxx_i2c_functionality,
 };
index 604b49e22df144748da5b9e4b29a8c53287bec7c..e0292e414ab2ccadb5110cc6e94af0827b0adcce 100644 (file)
@@ -109,7 +109,7 @@ static s32 nforce2_access(struct i2c_adapter *adap, u16 addr,
 static u32 nforce2_func(struct i2c_adapter *adapter);
 
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer = nforce2_access,
        .functionality = nforce2_func,
 };
index 592824087c490d4c488fbf1b9841701fb18c9eb4..952a28d485ce9e593b26f6d7d4b7336582c11564 100644 (file)
@@ -199,7 +199,7 @@ static u32 ocores_func(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm ocores_algorithm = {
+static const struct i2c_algorithm ocores_algorithm = {
        .master_xfer    = ocores_xfer,
        .functionality  = ocores_func,
 };
index a129af9913886aa744d1fa71d723e6a40d6f97ce..81d87d2c2a2d6a177f3c2bbdb2dec083aa31e073 100644 (file)
@@ -526,7 +526,7 @@ omap_i2c_isr(int this_irq, void *dev_id, struct pt_regs *regs)
        return count ? IRQ_HANDLED : IRQ_NONE;
 }
 
-static struct i2c_algorithm omap_i2c_algo = {
+static const struct i2c_algorithm omap_i2c_algo = {
        .master_xfer    = omap_i2c_xfer,
        .functionality  = omap_i2c_func,
 };
index 8f2f65b793b9a355e5f8b0022cd42711e0755644..30c7a1b38cbd7e5202106b8f060bb55a83f29e5d 100644 (file)
@@ -376,7 +376,7 @@ static u32 piix4_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_BLOCK_DATA;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = piix4_access,
        .functionality  = piix4_func,
 };
index d658d91079550d56f8c38bd8f31dce1c6e415160..a508cb962d244e89b4addc108f2c159212639364 100644 (file)
@@ -175,7 +175,7 @@ static u32 i2c_powermac_func(struct i2c_adapter * adapter)
 }
 
 /* For now, we only handle smbus */
-static struct i2c_algorithm i2c_powermac_algorithm = {
+static const struct i2c_algorithm i2c_powermac_algorithm = {
        .smbus_xfer     = i2c_powermac_smbus_xfer,
        .master_xfer    = i2c_powermac_master_xfer,
        .functionality  = i2c_powermac_func,
index ee114b48face4e2662f85cd4b6ab09f697b03656..cd4ad98ad517f9f0315208564922dfef8d69fffe 100644 (file)
@@ -926,7 +926,7 @@ static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
        return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm i2c_pxa_algorithm = {
+static const struct i2c_algorithm i2c_pxa_algorithm = {
        .master_xfer    = i2c_pxa_xfer,
        .functionality  = i2c_pxa_functionality,
 };
index 5d2950e91fc5fce62a6e3566791abcf2b1738d4c..9ebe429a0a0ffd2fc853b6268e5e1e0d1be1738d 100644 (file)
@@ -566,7 +566,7 @@ static u32 s3c24xx_i2c_func(struct i2c_adapter *adap)
 
 /* i2c bus registration info */
 
-static struct i2c_algorithm s3c24xx_i2c_algorithm = {
+static const struct i2c_algorithm s3c24xx_i2c_algorithm = {
        .master_xfer            = s3c24xx_i2c_xfer,
        .functionality          = s3c24xx_i2c_func,
 };
index 96c9e7bdd9e3ad13786df06bcaba44d4ab1024d9..8f2b1f0deb813b6876fa233c525094ea522e1cf7 100644 (file)
@@ -132,7 +132,7 @@ static u32 bit_func(struct i2c_adapter *adap)
 
 /* -----exported algorithm data: ------------------------------------- */
 
-static struct i2c_algorithm i2c_sibyte_algo = {
+static const struct i2c_algorithm i2c_sibyte_algo = {
        .smbus_xfer     = smbus_xfer,
        .functionality  = bit_func,
 };
index b57ab74d23ecaa42c14ff8d0a22a225766ba7c12..38bbfd840b6b181c51aab35856ceebfdfb737cdf 100644 (file)
@@ -358,7 +358,7 @@ static u32 sis5595_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_PROC_CALL;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = sis5595_access,
        .functionality  = sis5595_func,
 };
index acb75e2824140220fcea0b4e010fac3e0c69f0fb..dec0bafb52ab5cd5f241b7675800048a790c7cd8 100644 (file)
@@ -450,7 +450,7 @@ exit:
 }
 
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = sis630_access,
        .functionality  = sis630_func,
 };
index 1a73c0532fc770bb6c1f812ba7959cdc511427b5..7fd07fbac33681c3f81f49e66acad11660aa3533 100644 (file)
@@ -242,7 +242,7 @@ static u32 sis96x_func(struct i2c_adapter *adapter)
            I2C_FUNC_SMBUS_PROC_CALL;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = sis96x_access,
        .functionality  = sis96x_func,
 };
index 8cf374ddd98917481bfae7720b11b60c547d2b7e..a54adc50d162a5a580ae60a709b87bb802280c75 100644 (file)
@@ -115,7 +115,7 @@ static u32 stub_func(struct i2c_adapter *adapter)
                I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .functionality  = stub_func,
        .smbus_xfer     = stub_xfer,
 };
index 1ccc0fbc59472e75fa52dfaf152266fac4338853..efc6bbf0cc0a49818b569208f92f92062acefaf2 100644 (file)
@@ -299,7 +299,7 @@ static u32 vt596_func(struct i2c_adapter *adapter)
        return func;
 }
 
-static struct i2c_algorithm smbus_algorithm = {
+static const struct i2c_algorithm smbus_algorithm = {
        .smbus_xfer     = vt596_access,
        .functionality  = vt596_func,
 };
index eae9e81be375acecb2a697fd23b7afdcab944b6a..32aab0d34ee930eb3b9a6f0a95fa752c7f32b7d9 100644 (file)
@@ -383,7 +383,7 @@ static u32 scx200_acb_func(struct i2c_adapter *adapter)
 }
 
 /* For now, we only handle combined mode (smbus) */
-static struct i2c_algorithm scx200_acb_algorithm = {
+static const struct i2c_algorithm scx200_acb_algorithm = {
        .smbus_xfer     = scx200_acb_smbus_xfer,
        .functionality  = scx200_acb_func,
 };