All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] device: Fix comment for driver_data in struct device
@ 2019-02-05 12:19 David Engraf
  2019-02-05 13:23 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: David Engraf @ 2019-02-05 12:19 UTC (permalink / raw)
  To: gregkh, andriy.shevchenko, rafael.j.wysocki, hdegoede, aspriel,
	brgl, heikki.krogerus, vivek.gautam, joe, jroedel
  Cc: linux-kernel, David Engraf

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

Signed-off-by: David Engraf <david.engraf@sysgo.com>
---
 include/linux/device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index 6cb4640b6160..601594771153 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] device: Fix comment for driver_data in struct device
  2019-02-05 12:19 [PATCH] device: Fix comment for driver_data in struct device David Engraf
@ 2019-02-05 13:23 ` Andy Shevchenko
  2019-02-06  7:49   ` David Engraf
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2019-02-05 13:23 UTC (permalink / raw)
  To: David Engraf
  Cc: gregkh, rafael.j.wysocki, hdegoede, aspriel, brgl,
	heikki.krogerus, vivek.gautam, joe, jroedel, linux-kernel

On Tue, Feb 05, 2019 at 01:19:52PM +0100, David Engraf wrote:
> 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.

>  	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;
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] device: Fix comment for driver_data in struct device
  2019-02-05 13:23 ` Andy Shevchenko
@ 2019-02-06  7:49   ` David Engraf
  0 siblings, 0 replies; 3+ messages in thread
From: David Engraf @ 2019-02-06  7:49 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: gregkh, rafael.j.wysocki, hdegoede, aspriel, brgl,
	heikki.krogerus, vivek.gautam, joe, jroedel, linux-kernel

On 05.02.19 at 14:23, Andy Shevchenko wrote:
> On Tue, Feb 05, 2019 at 01:19:52PM +0100, David Engraf wrote:
>> 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


>>   	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;
>> -- 
>> 2.17.1
>>
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-06  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 12:19 [PATCH] device: Fix comment for driver_data in struct device David Engraf
2019-02-05 13:23 ` Andy Shevchenko
2019-02-06  7:49   ` David Engraf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.