[i2c] [PATCH] i2c: Make i2c_check_addr static

Jean Delvare khali at linux-fr.org
Tue Oct 16 17:53:49 CEST 2007


i2c_check_addr is only used inside i2c-core now, so we can make it
static and stop exporting it. Thanks to David Brownell for noticing.

Signed-off-by: Jean Delvare <khali at linux-fr.org>
---
 drivers/i2c/i2c-core.c |    3 +--
 include/linux/i2c.h    |    5 -----
 2 files changed, 1 insertion(+), 7 deletions(-)

--- linux-2.6.23-rc0.orig/drivers/i2c/i2c-core.c	2007-10-15 21:38:53.000000000 +0200
+++ linux-2.6.23-rc0/drivers/i2c/i2c-core.c	2007-10-16 17:43:48.000000000 +0200
@@ -673,7 +673,7 @@ static int __i2c_check_addr(struct i2c_a
 	return 0;
 }
 
-int i2c_check_addr(struct i2c_adapter *adapter, int addr)
+static int i2c_check_addr(struct i2c_adapter *adapter, int addr)
 {
 	int rval;
 
@@ -683,7 +683,6 @@ int i2c_check_addr(struct i2c_adapter *a
 
 	return rval;
 }
-EXPORT_SYMBOL(i2c_check_addr);
 
 int i2c_attach_client(struct i2c_client *client)
 {
--- linux-2.6.23-rc0.orig/include/linux/i2c.h	2007-10-15 21:39:08.000000000 +0200
+++ linux-2.6.23-rc0/include/linux/i2c.h	2007-10-16 17:43:21.000000000 +0200
@@ -400,11 +400,6 @@ extern int i2c_release_client(struct i2c
 extern void i2c_clients_command(struct i2c_adapter *adap,
 				unsigned int cmd, void *arg);
 
-/* returns -EBUSY if address has been taken, 0 if not. Note that the only
-   other place at which this is called is within i2c_attach_client; so
-   you can cheat by simply not registering. Not recommended, of course! */
-extern int i2c_check_addr (struct i2c_adapter *adapter, int addr);
-
 /* Detect function. It iterates over all possible addresses itself.
  * It will only call found_proc if some client is connected at the
  * specific address (unless a 'force' matched);


-- 
Jean Delvare



More information about the i2c mailing list