i2c: headers: don't use 'dev' as adapter variable
It is not a struct device, so 'dev' is confusing. Use 'adap', the most common name. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
c45d4ba867
commit
e1714daad7
@ -703,14 +703,14 @@ struct i2c_adapter {
|
|||||||
};
|
};
|
||||||
#define 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(const struct i2c_adapter *dev)
|
static inline void *i2c_get_adapdata(const struct i2c_adapter *adap)
|
||||||
{
|
{
|
||||||
return dev_get_drvdata(&dev->dev);
|
return dev_get_drvdata(&adap->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
|
static inline void i2c_set_adapdata(struct i2c_adapter *adap, void *data)
|
||||||
{
|
{
|
||||||
dev_set_drvdata(&dev->dev, data);
|
dev_set_drvdata(&adap->dev, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct i2c_adapter *
|
static inline struct i2c_adapter *
|
||||||
|
Loading…
Reference in New Issue
Block a user