diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-07 10:53:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-07 10:53:36 -0700 |
commit | f558b8364e19f9222e7976c64e9367f66bab02cc (patch) | |
tree | c50c0fc9a3ab8430c4aaa1170d1cc1e08448bd7b /drivers/base/property.c | |
parent | 80ef846e9909f22ccdc2a4a6d931266cecce8b2c (diff) | |
parent | 8c3e315d4296421cd26b3300ee0ac117f0877f20 (diff) | |
download | linux-stable-f558b8364e19f9222e7976c64e9367f66bab02cc.tar.gz linux-stable-f558b8364e19f9222e7976c64e9367f66bab02cc.tar.bz2 linux-stable-f558b8364e19f9222e7976c64e9367f66bab02cc.zip |
Merge tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here is the set of driver core patches for 5.8-rc1.
Not all that huge this release, just a number of small fixes and
updates:
- software node fixes
- kobject now sends KOBJ_REMOVE when it is removed from sysfs, not
when it is removed from memory (which could come much later)
- device link additions and fixes based on testing on more devices
- firmware core cleanups
- other minor changes, full details in the shortlog
All have been in linux-next for a while with no reported issues"
* tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (23 commits)
driver core: Update device link status correctly for SYNC_STATE_ONLY links
firmware_loader: change enum fw_opt to u32
software node: implement software_node_unregister()
kobject: send KOBJ_REMOVE uevent when the object is removed from sysfs
driver core: Remove unnecessary is_fwnode_dev variable in device_add()
drivers property: When no children in primary, try secondary
driver core: platform: Fix spelling errors in platform.c
driver core: Remove check in driver_deferred_probe_force_trigger()
of: platform: Batch fwnode parsing when adding all top level devices
driver core: fw_devlink: Add support for batching fwnode parsing
driver core: Look for waiting consumers only for a fwnode's primary device
driver core: Move code to the right part of the file
Revert "Revert "driver core: Set fw_devlink to "permissive" behavior by default""
drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
firmware_loader: move fw_fallback_config to a private kernel symbol namespace
driver core: Add missing '\n' in log messages
driver/base/soc: Use kobj_to_dev() API
Add documentation on meaning of -EPROBE_DEFER
driver core: platform: remove redundant assignment to variable ret
debugfs: Use the correct style for SPDX License Identifier
...
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r-- | drivers/base/property.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 5f35c0ccf5e0..1e6d75e65938 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -708,14 +708,23 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev, struct fwnode_handle *child) { struct acpi_device *adev = ACPI_COMPANION(dev); - struct fwnode_handle *fwnode = NULL; + struct fwnode_handle *fwnode = NULL, *next; if (dev->of_node) fwnode = &dev->of_node->fwnode; else if (adev) fwnode = acpi_fwnode_handle(adev); - return fwnode_get_next_child_node(fwnode, child); + /* Try to find a child in primary fwnode */ + next = fwnode_get_next_child_node(fwnode, child); + if (next) + return next; + + /* When no more children in primary, continue with secondary */ + if (!IS_ERR_OR_NULL(fwnode->secondary)) + next = fwnode_get_next_child_node(fwnode->secondary, child); + + return next; } EXPORT_SYMBOL_GPL(device_get_next_child_node); |