diff options
-rw-r--r-- | drivers/i2c/i2c-core.c | 4 | ||||
-rw-r--r-- | include/linux/i2c.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 1e3e1a5b4d86..ae07b874a5d7 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -111,14 +111,14 @@ struct bus_type i2c_bus_type = { | |||
111 | 111 | ||
112 | void i2c_adapter_dev_release(struct device *dev) | 112 | void i2c_adapter_dev_release(struct device *dev) |
113 | { | 113 | { |
114 | struct i2c_adapter *adap = dev_to_i2c_adapter(dev); | 114 | struct i2c_adapter *adap = to_i2c_adapter(dev); |
115 | complete(&adap->dev_released); | 115 | complete(&adap->dev_released); |
116 | } | 116 | } |
117 | 117 | ||
118 | static ssize_t | 118 | static ssize_t |
119 | show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf) | 119 | show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf) |
120 | { | 120 | { |
121 | struct i2c_adapter *adap = dev_to_i2c_adapter(dev); | 121 | struct i2c_adapter *adap = to_i2c_adapter(dev); |
122 | return sprintf(buf, "%s\n", adap->name); | 122 | return sprintf(buf, "%s\n", adap->name); |
123 | } | 123 | } |
124 | 124 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 953e71fb07b4..568dd1007b53 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -239,7 +239,7 @@ struct i2c_adapter { | |||
239 | char name[48]; | 239 | char name[48]; |
240 | struct completion dev_released; | 240 | struct completion dev_released; |
241 | }; | 241 | }; |
242 | #define dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) | 242 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
243 | 243 | ||
244 | static inline void *i2c_get_adapdata (struct i2c_adapter *dev) | 244 | static inline void *i2c_get_adapdata (struct i2c_adapter *dev) |
245 | { | 245 | { |