mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
i2c: implement i2c_verify_adapter
This converts a struct device * to a struct i2c_adapter * while verifying that the device really is an I2C adapter. Just like i2c_verify_client. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
This commit is contained in:
parent
ec39ef83eb
commit
643dd09eb2
2 changed files with 18 additions and 0 deletions
|
@ -232,6 +232,7 @@ struct i2c_client {
|
|||
#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
|
||||
|
||||
extern struct i2c_client *i2c_verify_client(struct device *dev);
|
||||
extern struct i2c_adapter *i2c_verify_adapter(struct device *dev);
|
||||
|
||||
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue