aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/chips/max6875.c5
-rw-r--r--include/linux/i2c.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
index 1a7993e6354..35a8e921529 100644
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -131,11 +131,6 @@ exit_up:
131 up(&data->update_lock); 131 up(&data->update_lock);
132} 132}
133 133
134static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
135{
136 return to_i2c_client(container_of(kobj, struct device, kobj));
137}
138
139static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off, 134static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off,
140 size_t count) 135 size_t count)
141{ 136{
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index be837b13f29..01744594381 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -160,6 +160,11 @@ struct i2c_client {
160}; 160};
161#define to_i2c_client(d) container_of(d, struct i2c_client, dev) 161#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
162 162
163static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
164{
165 return to_i2c_client(container_of(kobj, struct device, kobj));
166}
167
163static inline void *i2c_get_clientdata (struct i2c_client *dev) 168static inline void *i2c_get_clientdata (struct i2c_client *dev)
164{ 169{
165 return dev_get_drvdata (&dev->dev); 170 return dev_get_drvdata (&dev->dev);