提交 ef2c8321 编写于 作者: D David Brownell 提交者: Jean Delvare

i2c: Rename dev_to_i2c_adapter()

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: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 16ffadfc
...@@ -111,14 +111,14 @@ struct bus_type i2c_bus_type = { ...@@ -111,14 +111,14 @@ struct bus_type i2c_bus_type = {
void i2c_adapter_dev_release(struct device *dev) 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); complete(&adap->dev_released);
} }
static ssize_t static ssize_t
show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf) 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); return sprintf(buf, "%s\n", adap->name);
} }
......
...@@ -239,7 +239,7 @@ struct i2c_adapter { ...@@ -239,7 +239,7 @@ struct i2c_adapter {
char name[48]; char name[48];
struct completion dev_released; 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) static inline void *i2c_get_adapdata (struct i2c_adapter *dev)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册