device property: make device_property functions take const device *
authorGuenter Roeck <linux@roeck-us.net>
Wed, 19 Apr 2023 16:41:27 +0000 (09:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 12:25:07 +0000 (14:25 +0200)
commit046b6a171009e1ed9ede02194025e9ccd709beb2
tree2c0562b1acd14ca774e2a696b5d21f50654ca19a
parent11a96703943fc4293f50f554b9e33c79ef4f5d8d
device property: make device_property functions take const device *

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@alliedtelesis.co.nz>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20230419164127.3773278-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/property.c
include/linux/property.h