Skip to contentSkip to conversation

device: Fix comment for driver_data in struct device

PATCH In review David Engraf 2 participants 3 messages Feb 5, 2019 – Feb 6, 2019 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 device: Fix comment for driver_data in struct device

dev_set_drvdata/dev_get_drvdata is used to access driver_data in struct device.

---
 include/linux/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/device.h +1 -1
index 6cb4640b6160..601594771153 100644
@@ -985,7 +985,7 @@ struct device {
 	void		*platform_data;	/* Platform specific data, device
 					   core doesn't touch it */
 	void		*driver_data;	/* Driver data, set and get with
-					   dev_set/get_drvdata */
+					   dev_set_drvdata/dev_get_drvdata */
 	struct dev_links_info	links;
 	struct dev_pm_info	power;
 	struct dev_pm_domain	*pm_domain;
Signature · 1 line
2.17.1
#1 lore raw
Quoted 2 lines · David Engraf

dev_set_drvdata/dev_get_drvdata is used to access driver_data in struct device.

The original comment might be slight confusing, though we all know the concept of getters and setters.

Quoted 11 lines
include/linux/device.h +1 -1
 	void		*platform_data;	/* Platform specific data, device
 					   core doesn't touch it */
 	void		*driver_data;	/* Driver data, set and get with
-					   dev_set/get_drvdata */
+					   dev_set_drvdata/dev_get_drvdata */
 	struct dev_links_info	links;
 	struct dev_pm_info	power;
 	struct dev_pm_domain	*pm_domain;
Signature · 1 line
2.17.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 6 lines · Andy Shevchenko
Quoted 2 lines · David Engraf

dev_set_drvdata/dev_get_drvdata is used to access driver_data in struct device.

The original comment might be slight confusing, though we all know the concept of getters and setters.

Okay you're right. I was a bit confused about the syntax.

Thanks
- David

Quoted 12 lines
Quoted 11 lines

void *platform_data; /* Platform specific data, device
core doesn't touch it */
void *driver_data; /* Driver data, set and get with

include/linux/device.h +1 -1
-					   dev_set/get_drvdata */
+					   dev_set_drvdata/dev_get_drvdata */
  	struct dev_links_info	links;
  	struct dev_pm_info	power;
  	struct dev_pm_domain	*pm_domain;
Signature · 1 line
2.17.1