summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i2c/i2c-core.c4
-rw-r--r--include/linux/i2c.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 1e3e1a5b4d8..ae07b874a5d 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -111,14 +111,14 @@ struct bus_type i2c_bus_type = {
void i2c_adapter_dev_release(struct device *dev)
{
- struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
+ struct i2c_adapter *adap = to_i2c_adapter(dev);
complete(&adap->dev_released);
}
static ssize_t
show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
+ struct i2c_adapter *adap = to_i2c_adapter(dev);
return sprintf(buf, "%s\n", adap->name);
}
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 953e71fb07b..568dd1007b5 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -239,7 +239,7 @@ struct i2c_adapter {
char name[48];
struct completion dev_released;
};
-#define dev_to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
+#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
static inline void *i2c_get_adapdata (struct i2c_adapter *dev)
{