device: Fix comment for driver_data in struct device
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.
Signed-off-by David Engraf <[email protected]>
--- include/linux/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/device.h +1 -1
@@ -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
Quoted 2 lines · David Engraf
dev_set_drvdata/dev_get_drvdata is used to access
driver_datain 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
-1void *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
Quoted 6 lines · Andy Shevchenko
Quoted 2 lines · David Engraf
dev_set_drvdata/dev_get_drvdata is used to access
driver_datain 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 withinclude/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