It is not a struct device, so 'dev' is confusing. Use 'adap', the most common name.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -703,14 +703,14 @@ struct i2c_adapter { · 702 unmodified lines | ||
| 703 | 703 | }; |
| 704 | 704 | #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) |
| 705 | 705 | |
| 706 | −static inline void *i2c_get_adapdata(const struct i2c_adapter *dev) | |
| 706 | +static inline void *i2c_get_adapdata(const struct i2c_adapter *adap) | |
| 707 | 707 | { |
| 708 | − return dev_get_drvdata(&dev->dev); | |
| 708 | + return dev_get_drvdata(&adap->dev); | |
| 709 | 709 | } |
| 710 | 710 | |
| 711 | −static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data) | |
| 711 | +static inline void i2c_set_adapdata(struct i2c_adapter *adap, void *data) | |
| 712 | 712 | { |
| 713 | − dev_set_drvdata(&dev->dev, data); | |
| 713 | + dev_set_drvdata(&adap->dev, data); | |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | static inline struct i2c_adapter * |