]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: mfd-core: Ensure disabled devices are ignored without error
authorLee Jones <lee.jones@linaro.org>
Wed, 19 Aug 2020 08:16:50 +0000 (09:16 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 28 Aug 2020 08:51:41 +0000 (09:51 +0100)
commitea3d01b286678182d0ac09c7c36b9c1190de81d3
tree3ce0c84fa4ae3730b285cde5049e5f7f38353f93
parent3206c638c8896f907c6b7b98ea20abae26427b19
mfd: mfd-core: Ensure disabled devices are ignored without error

Commit e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match
devices with the correct of_nodes") changed the semantics for disabled
devices in mfd_add_device().  Instead of silently ignoring a disabled
child device, an error was returned.  On receipt of the error
mfd_add_devices() the precedes to remove *all* child devices and
returns an all-failed error to the caller, which will inevitably fail
the parent device as well.

This patch reverts back to the old semantics and ignores child devices
which are disabled in Device Tree.

Fixes: e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
Reported-by: Icenowy Zheng <icenowy@aosc.io>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mfd-core.c