From: David Woodhouse Date: Tue, 25 Apr 2006 13:10:40 +0000 (+0100) Subject: Sanitise linux/i2c-algo-ite.h for userspace consumption X-Git-Tag: v2.6.18-rc1~1103^2~61 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a570cc0a41bd316afc91ba2c7151fed70d10b31;p=linux-2.6 Sanitise linux/i2c-algo-ite.h for userspace consumption It doesn't need to include i2c.h, because a forward declaration of struct i2c_adapter is perfectly sufficient. And it can be inside #ifdef __KERNEL__ along with the kernel-internal structure definition. Signed-off-by: David Woodhouse --- diff --git a/include/linux/i2c-algo-ite.h b/include/linux/i2c-algo-ite.h index 26a8b89855..0073fe96c7 100644 --- a/include/linux/i2c-algo-ite.h +++ b/include/linux/i2c-algo-ite.h @@ -29,7 +29,7 @@ #ifndef I2C_ALGO_ITE_H #define I2C_ALGO_ITE_H 1 -#include +#include /* Example of a sequential read request: struct i2c_iic_msg s_msg; @@ -49,6 +49,9 @@ struct i2c_iic_msg { char *buf; /* pointer to msg data */ }; +#ifdef __KERNEL__ +struct i2c_adapter; + struct i2c_algo_iic_data { void *data; /* private data for lolevel routines */ void (*setiic) (void *data, int ctl, int val); @@ -65,5 +68,5 @@ struct i2c_algo_iic_data { int i2c_iic_add_bus(struct i2c_adapter *); int i2c_iic_del_bus(struct i2c_adapter *); - +#endif /* __KERNEL__ */ #endif /* I2C_ALGO_ITE_H */