aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/i2c/writing-clients2
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/i2c.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index d73ee117a8ca..3b01350c149c 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -83,7 +83,7 @@ be very useful.
83 void i2c_set_clientdata(struct i2c_client *client, void *data); 83 void i2c_set_clientdata(struct i2c_client *client, void *data);
84 84
85 /* retrieve the value */ 85 /* retrieve the value */
86 void *i2c_get_clientdata(struct i2c_client *client); 86 void *i2c_get_clientdata(const struct i2c_client *client);
87 87
88An example structure is below. 88An example structure is below.
89 89
diff --git a/include/linux/device.h b/include/linux/device.h
index 987f5912720a..1a3686d15f98 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -450,7 +450,7 @@ static inline void set_dev_node(struct device *dev, int node)
450} 450}
451#endif 451#endif
452 452
453static inline void *dev_get_drvdata(struct device *dev) 453static inline void *dev_get_drvdata(const struct device *dev)
454{ 454{
455 return dev->driver_data; 455 return dev->driver_data;
456} 456}
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 4ac8ec3c7927..a411f0b70e8e 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -224,7 +224,7 @@ static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
224 return to_i2c_client(dev); 224 return to_i2c_client(dev);
225} 225}
226 226
227static inline void *i2c_get_clientdata (struct i2c_client *dev) 227static inline void *i2c_get_clientdata(const struct i2c_client *dev)
228{ 228{
229 return dev_get_drvdata (&dev->dev); 229 return dev_get_drvdata (&dev->dev);
230} 230}
@@ -369,7 +369,7 @@ struct i2c_adapter {
369}; 369};
370#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) 370#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
371 371
372static inline void *i2c_get_adapdata (struct i2c_adapter *dev) 372static inline void *i2c_get_adapdata(const struct i2c_adapter *dev)
373{ 373{
374 return dev_get_drvdata (&dev->dev); 374 return dev_get_drvdata (&dev->dev);
375} 375}