Commit:     263867631ea02741baf878ca9faaf94b1563b9d7
Parent:     104cb574feb3033299568483a3f68031f47e0d43
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Sun Feb 24 20:03:42 2008 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Feb 24 20:03:42 2008 +0100

    i2c: Make i2c_register_board_info() a NOP when CONFIG_I2C_BOARDINFO=n
    Don't require platform code to be #ifdeffed according to whether
    I2C is enabled or not ... if it's not enabled, let GCC compile out
    all I2C device declarations.  (Issue noted on an NSLU2 build that
    didn't configure I2C.)
    Signed-off-by: David Brownell <[EMAIL PROTECTED]>
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
 include/linux/i2c.h |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 2d1c608..365e0df 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -271,9 +271,16 @@ extern void i2c_unregister_device(struct i2c_client *);
  * This is done at arch_initcall time, before declaring any i2c adapters.
  * Modules for add-on boards must use other calls.
 extern int
 i2c_register_board_info(int busnum, struct i2c_board_info const *info, 
unsigned n);
+static inline int
+i2c_register_board_info(int busnum, struct i2c_board_info const *info, 
unsigned n)
+       return 0;
  * The following structs are for those who like to implement new bus drivers:
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to