[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEBY9Ec8pJf15Ya4@kekkonen.localdomain>
Date: Thu, 20 Apr 2023 00:11:16 +0300
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: Re: [PATCH] device property: make device_property functions take
const device *
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@...iedtelesis.co.nz>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
> 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@...ux.intel.com>
--
Sakari Ailus
Powered by blists - more mailing lists