[i2c] [PATCH 10/13] i2c: Let drivers constify i2c_algorithm data

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


From: David Brownell <david-b at pacbell.net>
Content-Disposition: inline; filename=i2c-constify-i2c_algorithm.patch

i2c: Let drivers constify i2c_algorithm data

Let drivers constify I2C algorithm method operations tables,
moving them from ".data" to ".rodata".

Signed-off-by: David Brownell <dbrownell at users.sourceforge.net>
Signed-off-by: Jean Delvare <khali at linux-fr.org>

---
 include/linux/i2c.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.18-rc5.orig/include/linux/i2c.h	2006-09-02 09:58:47.000000000 +0200
+++ linux-2.6.18-rc5/include/linux/i2c.h	2006-09-03 17:11:09.000000000 +0200
@@ -220,7 +220,7 @@
 	struct module *owner;
 	unsigned int id;
 	unsigned int class;
-	struct i2c_algorithm *algo;/* the algorithm to access the bus	*/
+	const struct i2c_algorithm *algo; /* the algorithm to access the bus */
 	void *algo_data;
 
 	/* --- administration stuff. */

-- 
Jean Delvare



More information about the i2c mailing list