[i2c] [PATCH 11/13] i2c: Constify i2c_algorithm declarations, part 1

Jean Delvare khali at linux-fr.org
Sun Sep 3 22:38:52 CEST 2006


Content-Disposition: inline; filename=i2c-algos-constify-i2c_algorithm.patch

i2c: Constify i2c_algorithm declarations, part 1

Make struct i2c_algorithm declarations const in all i2c algorithm
drivers.

Signed-off-by: Jean Delvare <khali at linux-fr.org>
Cc: David Brownell <david-b at pacbell.net>
---
 drivers/i2c/algos/i2c-algo-bit.c |    2 +-
 drivers/i2c/algos/i2c-algo-pca.c |    2 +-
 drivers/i2c/algos/i2c-algo-pcf.c |    2 +-
 drivers/i2c/algos/i2c-algo-sgi.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

--- linux-2.6.18-rc5.orig/drivers/i2c/algos/i2c-algo-bit.c	2006-09-03 16:26:09.000000000 +0200
+++ linux-2.6.18-rc5/drivers/i2c/algos/i2c-algo-bit.c	2006-09-03 17:50:43.000000000 +0200
@@ -512,7 +512,7 @@
 
 /* -----exported algorithm data: -------------------------------------	*/
 
-static struct i2c_algorithm i2c_bit_algo = {
+static const struct i2c_algorithm i2c_bit_algo = {
 	.master_xfer	= bit_xfer,
 	.functionality	= bit_func,
 };
--- linux-2.6.18-rc5.orig/drivers/i2c/algos/i2c-algo-pca.c	2006-07-26 23:08:37.000000000 +0200
+++ linux-2.6.18-rc5/drivers/i2c/algos/i2c-algo-pca.c	2006-09-03 17:50:34.000000000 +0200
@@ -355,7 +355,7 @@
 	return 0;
 }
 
-static struct i2c_algorithm pca_algo = {
+static const struct i2c_algorithm pca_algo = {
 	.master_xfer	= pca_xfer,
 	.functionality	= pca_func,
 };
--- linux-2.6.18-rc5.orig/drivers/i2c/algos/i2c-algo-pcf.c	2006-07-26 23:08:37.000000000 +0200
+++ linux-2.6.18-rc5/drivers/i2c/algos/i2c-algo-pcf.c	2006-09-03 17:50:28.000000000 +0200
@@ -458,7 +458,7 @@
 
 /* -----exported algorithm data: -------------------------------------	*/
 
-static struct i2c_algorithm pcf_algo = {
+static const struct i2c_algorithm pcf_algo = {
 	.master_xfer	= pcf_xfer,
 	.functionality	= pcf_func,
 };
--- linux-2.6.18-rc5.orig/drivers/i2c/algos/i2c-algo-sgi.c	2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.18-rc5/drivers/i2c/algos/i2c-algo-sgi.c	2006-09-03 17:50:21.000000000 +0200
@@ -157,7 +157,7 @@
 	return I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm sgi_algo = {
+static const struct i2c_algorithm sgi_algo = {
 	.master_xfer	= sgi_xfer,
 	.functionality	= sgi_func,
 };

-- 
Jean Delvare



More information about the i2c mailing list