summaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-04-17 12:43:33 -0600
committerWolfram Sang <w.sang@pengutronix.de>2012-05-12 14:28:16 +0200
commit643dd09eb27b40ced671564edbe2640935fe37c2 (patch)
tree2237d5e572351e2d740c34050f7f20c2ec06745b /include/linux/i2c.h
parentec39ef83eb9b22cc732329e85fc4ec03e76d9dda (diff)
downloadtalos-op-linux-643dd09eb27b40ced671564edbe2640935fe37c2.tar.gz
talos-op-linux-643dd09eb27b40ced671564edbe2640935fe37c2.zip
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>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 195d8b3d9cfb..b66cb601435f 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -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)
{
OpenPOWER on IntegriCloud