device property: Check fwnode->secondary when finding properties
authorDaniel Scally <djrscally@gmail.com>
Sun, 28 Nov 2021 23:24:55 +0000 (23:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:47 +0000 (10:22 +0200)
commitecc7b8dedf73cbc93db2891b62ba0f699caec618
tree013debb93c60353b816d2e762e533f1183088ba6
parentb61f1f3a0ea71ab946392c8dfedc5d327d9111ca
device property: Check fwnode->secondary when finding properties

[ Upstream commit c097af1d0a8483b44fa30e86b311991d76b6ae67 ]

fwnode_property_get_reference_args() searches for named properties
against a fwnode_handle, but these could instead be against the fwnode's
secondary. If the property isn't found against the primary, check the
secondary to see if it's there instead.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Link: https://lore.kernel.org/r/20211128232455.39332-1-djrscally@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/property.c