i2c: Rename dev_to_i2c_adapter()
authorDavid Brownell <david-b@pacbell.net>
Tue, 1 May 2007 21:26:28 +0000 (23:26 +0200)
committerJean Delvare <khali@hyperion.delvare>
Tue, 1 May 2007 21:26:28 +0000 (23:26 +0200)
Rename dev_to_i2c_adapter() as to_i2c_adapter(), since the previous
syntax was a surprising and needless difference from normal naming
conventions in Linux.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/i2c-core.c
include/linux/i2c.h

index 1e3e1a5b4d8630e18839a7bd899a129b5e87dd88..ae07b874a5d7b7cc0b1aa922cc5d893bc25ab574 100644 (file)
@@ -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);
 }
 
index 953e71fb07b4e71fe7f3ed8eda32954db2ec3ef7..568dd1007b53b6c7b796ac2e1988e621f9088edc 100644 (file)
@@ -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)
 {