Re: [PATCH] device property: make device_property functions take const device *

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 19, 2023 at 09:41:27AM -0700, Guenter Roeck wrote:
> device_property functions do not modify the device pointer passed to them.
> The underlying of_device and fwnode_ functions actually already take
> const * arguments. Mark the parameter constant to simplify conversion
> from of_property to device_property functions, and to let the calling code
> use const device pointers where possible.
> 
> Cc: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---
> Found by Chris when trying to convert a driver from of_property_ to
> device_property_ functions. I don't really see a reason why the device
> parameter to device_property functions should not be const.
> Please let me know if I am missing sonething.

Thanks!

Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

-- 
Sakari Ailus



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux