aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-09-03 16:39:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 18:38:52 -0400
commit8f9082c5ce0e2c2f7ad0211b0c089f680d2efc11 (patch)
tree3e4dda294cf571eb4c07a3378245e6e7c145754f /drivers/i2c/busses
parent9e11a9fbfe48a2f65188aae64bf4f690e40ea2f4 (diff)
i2c: Constify i2c_algorithm declarations, part 2
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>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-ali1535.c2
-rw-r--r--drivers/i2c/busses/i2c-ali1563.c2
-rw-r--r--drivers/i2c/busses/i2c-ali15x3.c2
-rw-r--r--drivers/i2c/busses/i2c-amd756.c2
-rw-r--r--drivers/i2c/busses/i2c-amd8111.c2
-rw-r--r--drivers/i2c/busses/i2c-au1550.c2
-rw-r--r--drivers/i2c/busses/i2c-i801.c2
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c2
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c2
-rw-r--r--drivers/i2c/busses/i2c-isa.c2
-rw-r--r--drivers/i2c/busses/i2c-mpc.c2
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c2
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c2
-rw-r--r--drivers/i2c/busses/i2c-ocores.c2
-rw-r--r--drivers/i2c/busses/i2c-omap.c2
-rw-r--r--drivers/i2c/busses/i2c-piix4.c2
-rw-r--r--drivers/i2c/busses/i2c-powermac.c2
-rw-r--r--drivers/i2c/busses/i2c-pxa.c2
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c2
-rw-r--r--drivers/i2c/busses/i2c-sibyte.c2
-rw-r--r--drivers/i2c/busses/i2c-sis5595.c2
-rw-r--r--drivers/i2c/busses/i2c-sis630.c2
-rw-r--r--drivers/i2c/busses/i2c-sis96x.c2
-rw-r--r--drivers/i2c/busses/i2c-stub.c2
-rw-r--r--drivers/i2c/busses/i2c-viapro.c2
-rw-r--r--drivers/i2c/busses/scx200_acb.c2
26 files changed, 26 insertions, 26 deletions
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
index d3ef46aeeb3c..e75d339a3481 100644
--- a/drivers/i2c/busses/i2c-ali1535.c
+++ b/drivers/i2c/busses/i2c-ali1535.c
@@ -468,7 +468,7 @@ static u32 ali1535_func(struct i2c_adapter *adapter)
468 I2C_FUNC_SMBUS_BLOCK_DATA; 468 I2C_FUNC_SMBUS_BLOCK_DATA;
469} 469}
470 470
471static struct i2c_algorithm smbus_algorithm = { 471static const struct i2c_algorithm smbus_algorithm = {
472 .smbus_xfer = ali1535_access, 472 .smbus_xfer = ali1535_access,
473 .functionality = ali1535_func, 473 .functionality = ali1535_func,
474}; 474};
diff --git a/drivers/i2c/busses/i2c-ali1563.c b/drivers/i2c/busses/i2c-ali1563.c
index e6f63208fc4a..33fbb47100a3 100644
--- a/drivers/i2c/busses/i2c-ali1563.c
+++ b/drivers/i2c/busses/i2c-ali1563.c
@@ -367,7 +367,7 @@ static void ali1563_shutdown(struct pci_dev *dev)
367 release_region(ali1563_smba,ALI1563_SMB_IOSIZE); 367 release_region(ali1563_smba,ALI1563_SMB_IOSIZE);
368} 368}
369 369
370static struct i2c_algorithm ali1563_algorithm = { 370static const struct i2c_algorithm ali1563_algorithm = {
371 .smbus_xfer = ali1563_access, 371 .smbus_xfer = ali1563_access,
372 .functionality = ali1563_func, 372 .functionality = ali1563_func,
373}; 373};
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
index 7a5c0941dbc1..3f11b6e1a341 100644
--- a/drivers/i2c/busses/i2c-ali15x3.c
+++ b/drivers/i2c/busses/i2c-ali15x3.c
@@ -463,7 +463,7 @@ static u32 ali15x3_func(struct i2c_adapter *adapter)
463 I2C_FUNC_SMBUS_BLOCK_DATA; 463 I2C_FUNC_SMBUS_BLOCK_DATA;
464} 464}
465 465
466static struct i2c_algorithm smbus_algorithm = { 466static const struct i2c_algorithm smbus_algorithm = {
467 .smbus_xfer = ali15x3_access, 467 .smbus_xfer = ali15x3_access,
468 .functionality = ali15x3_func, 468 .functionality = ali15x3_func,
469}; 469};
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
index 1750dedaf4b5..2d21afdc5b1c 100644
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -294,7 +294,7 @@ static u32 amd756_func(struct i2c_adapter *adapter)
294 I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_PROC_CALL; 294 I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_PROC_CALL;
295} 295}
296 296
297static struct i2c_algorithm smbus_algorithm = { 297static const struct i2c_algorithm smbus_algorithm = {
298 .smbus_xfer = amd756_access, 298 .smbus_xfer = amd756_access,
299 .functionality = amd756_func, 299 .functionality = amd756_func,
300}; 300};
diff --git a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
index e5ef560e686a..0fbc7186c91a 100644
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -316,7 +316,7 @@ static u32 amd8111_func(struct i2c_adapter *adapter)
316 I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC; 316 I2C_FUNC_SMBUS_I2C_BLOCK | I2C_FUNC_SMBUS_HWPEC_CALC;
317} 317}
318 318
319static struct i2c_algorithm smbus_algorithm = { 319static const struct i2c_algorithm smbus_algorithm = {
320 .smbus_xfer = amd8111_access, 320 .smbus_xfer = amd8111_access,
321 .functionality = amd8111_func, 321 .functionality = amd8111_func,
322}; 322};
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index 7a005ddfb11e..d7e7c359fc36 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -287,7 +287,7 @@ au1550_func(struct i2c_adapter *adap)
287 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 287 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
288} 288}
289 289
290static struct i2c_algorithm au1550_algo = { 290static const struct i2c_algorithm au1550_algo = {
291 .master_xfer = au1550_xfer, 291 .master_xfer = au1550_xfer,
292 .functionality = au1550_func, 292 .functionality = au1550_func,
293}; 293};
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 7be1d0a3e8f8..bbb2fbee836f 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -434,7 +434,7 @@ static u32 i801_func(struct i2c_adapter *adapter)
434 | (isich4 ? I2C_FUNC_SMBUS_HWPEC_CALC : 0); 434 | (isich4 ? I2C_FUNC_SMBUS_HWPEC_CALC : 0);
435} 435}
436 436
437static struct i2c_algorithm smbus_algorithm = { 437static const struct i2c_algorithm smbus_algorithm = {
438 .smbus_xfer = i801_access, 438 .smbus_xfer = i801_access,
439 .functionality = i801_func, 439 .functionality = i801_func,
440}; 440};
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 0599bbd65d93..5bccb5d68318 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -625,7 +625,7 @@ static u32 iic_func(struct i2c_adapter *adap)
625 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR; 625 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
626} 626}
627 627
628static struct i2c_algorithm iic_algo = { 628static const struct i2c_algorithm iic_algo = {
629 .master_xfer = iic_xfer, 629 .master_xfer = iic_xfer,
630 .functionality = iic_func 630 .functionality = iic_func
631}; 631};
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index 48c56939c861..8e413150af37 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -401,7 +401,7 @@ iop3xx_i2c_func(struct i2c_adapter *adap)
401 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 401 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
402} 402}
403 403
404static struct i2c_algorithm iop3xx_i2c_algo = { 404static const struct i2c_algorithm iop3xx_i2c_algo = {
405 .master_xfer = iop3xx_i2c_master_xfer, 405 .master_xfer = iop3xx_i2c_master_xfer,
406 .algo_control = iop3xx_i2c_algo_control, 406 .algo_control = iop3xx_i2c_algo_control,
407 .functionality = iop3xx_i2c_func, 407 .functionality = iop3xx_i2c_func,
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
index 7a8d2c148a80..4380653748a4 100644
--- a/drivers/i2c/busses/i2c-isa.c
+++ b/drivers/i2c/busses/i2c-isa.c
@@ -43,7 +43,7 @@
43static u32 isa_func(struct i2c_adapter *adapter); 43static u32 isa_func(struct i2c_adapter *adapter);
44 44
45/* This is the actual algorithm we define */ 45/* This is the actual algorithm we define */
46static struct i2c_algorithm isa_algorithm = { 46static const struct i2c_algorithm isa_algorithm = {
47 .functionality = isa_func, 47 .functionality = isa_func,
48}; 48};
49 49
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 377ab40944b8..155a986de516 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -272,7 +272,7 @@ static u32 mpc_functionality(struct i2c_adapter *adap)
272 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 272 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
273} 273}
274 274
275static struct i2c_algorithm mpc_algo = { 275static const struct i2c_algorithm mpc_algo = {
276 .master_xfer = mpc_xfer, 276 .master_xfer = mpc_xfer,
277 .functionality = mpc_functionality, 277 .functionality = mpc_functionality,
278}; 278};
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index ac5cde1bbd2b..eacbaf745b64 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -431,7 +431,7 @@ mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
431 return num; 431 return num;
432} 432}
433 433
434static struct i2c_algorithm mv64xxx_i2c_algo = { 434static const struct i2c_algorithm mv64xxx_i2c_algo = {
435 .master_xfer = mv64xxx_i2c_xfer, 435 .master_xfer = mv64xxx_i2c_xfer,
436 .functionality = mv64xxx_i2c_functionality, 436 .functionality = mv64xxx_i2c_functionality,
437}; 437};
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 604b49e22df1..e0292e414ab2 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -109,7 +109,7 @@ static s32 nforce2_access(struct i2c_adapter *adap, u16 addr,
109static u32 nforce2_func(struct i2c_adapter *adapter); 109static u32 nforce2_func(struct i2c_adapter *adapter);
110 110
111 111
112static struct i2c_algorithm smbus_algorithm = { 112static const struct i2c_algorithm smbus_algorithm = {
113 .smbus_xfer = nforce2_access, 113 .smbus_xfer = nforce2_access,
114 .functionality = nforce2_func, 114 .functionality = nforce2_func,
115}; 115};
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 592824087c49..952a28d485ce 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -199,7 +199,7 @@ static u32 ocores_func(struct i2c_adapter *adap)
199 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 199 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
200} 200}
201 201
202static struct i2c_algorithm ocores_algorithm = { 202static const struct i2c_algorithm ocores_algorithm = {
203 .master_xfer = ocores_xfer, 203 .master_xfer = ocores_xfer,
204 .functionality = ocores_func, 204 .functionality = ocores_func,
205}; 205};
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index a129af991388..81d87d2c2a2d 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -526,7 +526,7 @@ omap_i2c_isr(int this_irq, void *dev_id, struct pt_regs *regs)
526 return count ? IRQ_HANDLED : IRQ_NONE; 526 return count ? IRQ_HANDLED : IRQ_NONE;
527} 527}
528 528
529static struct i2c_algorithm omap_i2c_algo = { 529static const struct i2c_algorithm omap_i2c_algo = {
530 .master_xfer = omap_i2c_xfer, 530 .master_xfer = omap_i2c_xfer,
531 .functionality = omap_i2c_func, 531 .functionality = omap_i2c_func,
532}; 532};
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 8f2f65b793b9..30c7a1b38cbd 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -376,7 +376,7 @@ static u32 piix4_func(struct i2c_adapter *adapter)
376 I2C_FUNC_SMBUS_BLOCK_DATA; 376 I2C_FUNC_SMBUS_BLOCK_DATA;
377} 377}
378 378
379static struct i2c_algorithm smbus_algorithm = { 379static const struct i2c_algorithm smbus_algorithm = {
380 .smbus_xfer = piix4_access, 380 .smbus_xfer = piix4_access,
381 .functionality = piix4_func, 381 .functionality = piix4_func,
382}; 382};
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index d658d9107955..a508cb962d24 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -175,7 +175,7 @@ static u32 i2c_powermac_func(struct i2c_adapter * adapter)
175} 175}
176 176
177/* For now, we only handle smbus */ 177/* For now, we only handle smbus */
178static struct i2c_algorithm i2c_powermac_algorithm = { 178static const struct i2c_algorithm i2c_powermac_algorithm = {
179 .smbus_xfer = i2c_powermac_smbus_xfer, 179 .smbus_xfer = i2c_powermac_smbus_xfer,
180 .master_xfer = i2c_powermac_master_xfer, 180 .master_xfer = i2c_powermac_master_xfer,
181 .functionality = i2c_powermac_func, 181 .functionality = i2c_powermac_func,
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index ee114b48face..cd4ad98ad517 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -926,7 +926,7 @@ static u32 i2c_pxa_functionality(struct i2c_adapter *adap)
926 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; 926 return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
927} 927}
928 928
929static struct i2c_algorithm i2c_pxa_algorithm = { 929static const struct i2c_algorithm i2c_pxa_algorithm = {
930 .master_xfer = i2c_pxa_xfer, 930 .master_xfer = i2c_pxa_xfer,
931 .functionality = i2c_pxa_functionality, 931 .functionality = i2c_pxa_functionality,
932}; 932};
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 5d2950e91fc5..9ebe429a0a0f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -566,7 +566,7 @@ static u32 s3c24xx_i2c_func(struct i2c_adapter *adap)
566 566
567/* i2c bus registration info */ 567/* i2c bus registration info */
568 568
569static struct i2c_algorithm s3c24xx_i2c_algorithm = { 569static const struct i2c_algorithm s3c24xx_i2c_algorithm = {
570 .master_xfer = s3c24xx_i2c_xfer, 570 .master_xfer = s3c24xx_i2c_xfer,
571 .functionality = s3c24xx_i2c_func, 571 .functionality = s3c24xx_i2c_func,
572}; 572};
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c
index 96c9e7bdd9e3..8f2b1f0deb81 100644
--- a/drivers/i2c/busses/i2c-sibyte.c
+++ b/drivers/i2c/busses/i2c-sibyte.c
@@ -132,7 +132,7 @@ static u32 bit_func(struct i2c_adapter *adap)
132 132
133/* -----exported algorithm data: ------------------------------------- */ 133/* -----exported algorithm data: ------------------------------------- */
134 134
135static struct i2c_algorithm i2c_sibyte_algo = { 135static const struct i2c_algorithm i2c_sibyte_algo = {
136 .smbus_xfer = smbus_xfer, 136 .smbus_xfer = smbus_xfer,
137 .functionality = bit_func, 137 .functionality = bit_func,
138}; 138};
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
index b57ab74d23ec..38bbfd840b6b 100644
--- a/drivers/i2c/busses/i2c-sis5595.c
+++ b/drivers/i2c/busses/i2c-sis5595.c
@@ -358,7 +358,7 @@ static u32 sis5595_func(struct i2c_adapter *adapter)
358 I2C_FUNC_SMBUS_PROC_CALL; 358 I2C_FUNC_SMBUS_PROC_CALL;
359} 359}
360 360
361static struct i2c_algorithm smbus_algorithm = { 361static const struct i2c_algorithm smbus_algorithm = {
362 .smbus_xfer = sis5595_access, 362 .smbus_xfer = sis5595_access,
363 .functionality = sis5595_func, 363 .functionality = sis5595_func,
364}; 364};
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
index acb75e282414..dec0bafb52ab 100644
--- a/drivers/i2c/busses/i2c-sis630.c
+++ b/drivers/i2c/busses/i2c-sis630.c
@@ -450,7 +450,7 @@ exit:
450} 450}
451 451
452 452
453static struct i2c_algorithm smbus_algorithm = { 453static const struct i2c_algorithm smbus_algorithm = {
454 .smbus_xfer = sis630_access, 454 .smbus_xfer = sis630_access,
455 .functionality = sis630_func, 455 .functionality = sis630_func,
456}; 456};
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
index 1a73c0532fc7..7fd07fbac336 100644
--- a/drivers/i2c/busses/i2c-sis96x.c
+++ b/drivers/i2c/busses/i2c-sis96x.c
@@ -242,7 +242,7 @@ static u32 sis96x_func(struct i2c_adapter *adapter)
242 I2C_FUNC_SMBUS_PROC_CALL; 242 I2C_FUNC_SMBUS_PROC_CALL;
243} 243}
244 244
245static struct i2c_algorithm smbus_algorithm = { 245static const struct i2c_algorithm smbus_algorithm = {
246 .smbus_xfer = sis96x_access, 246 .smbus_xfer = sis96x_access,
247 .functionality = sis96x_func, 247 .functionality = sis96x_func,
248}; 248};
diff --git a/drivers/i2c/busses/i2c-stub.c b/drivers/i2c/busses/i2c-stub.c
index 8cf374ddd989..a54adc50d162 100644
--- a/drivers/i2c/busses/i2c-stub.c
+++ b/drivers/i2c/busses/i2c-stub.c
@@ -115,7 +115,7 @@ static u32 stub_func(struct i2c_adapter *adapter)
115 I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA; 115 I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA;
116} 116}
117 117
118static struct i2c_algorithm smbus_algorithm = { 118static const struct i2c_algorithm smbus_algorithm = {
119 .functionality = stub_func, 119 .functionality = stub_func,
120 .smbus_xfer = stub_xfer, 120 .smbus_xfer = stub_xfer,
121}; 121};
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
index 1ccc0fbc5947..efc6bbf0cc0a 100644
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -299,7 +299,7 @@ static u32 vt596_func(struct i2c_adapter *adapter)
299 return func; 299 return func;
300} 300}
301 301
302static struct i2c_algorithm smbus_algorithm = { 302static const struct i2c_algorithm smbus_algorithm = {
303 .smbus_xfer = vt596_access, 303 .smbus_xfer = vt596_access,
304 .functionality = vt596_func, 304 .functionality = vt596_func,
305}; 305};
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index eae9e81be375..32aab0d34ee9 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -383,7 +383,7 @@ static u32 scx200_acb_func(struct i2c_adapter *adapter)
383} 383}
384 384
385/* For now, we only handle combined mode (smbus) */ 385/* For now, we only handle combined mode (smbus) */
386static struct i2c_algorithm scx200_acb_algorithm = { 386static const struct i2c_algorithm scx200_acb_algorithm = {
387 .smbus_xfer = scx200_acb_smbus_xfer, 387 .smbus_xfer = scx200_acb_smbus_xfer,
388 .functionality = scx200_acb_func, 388 .functionality = scx200_acb_func,
389}; 389};