mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
i2c: Constify i2c_get_clientdata's parameter
i2c_get_clientdata doesn't change the i2c_client it is passed as a parameter, so it can be constified. Same for i2c_get_adapdata. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
d955cafb5c
commit
7d1d8999b4
3 changed files with 4 additions and 4 deletions
|
@ -224,7 +224,7 @@ static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
|
|||
return to_i2c_client(dev);
|
||||
}
|
||||
|
||||
static inline void *i2c_get_clientdata (struct i2c_client *dev)
|
||||
static inline void *i2c_get_clientdata(const struct i2c_client *dev)
|
||||
{
|
||||
return dev_get_drvdata (&dev->dev);
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ struct i2c_adapter {
|
|||
};
|
||||
#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(const struct i2c_adapter *dev)
|
||||
{
|
||||
return dev_get_drvdata (&dev->dev);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue