[PATCH 5/5] of: platform: instantiate reserved devices

Zev Weiss
2021-10-22T02:00:58Z

Devices with a "reserved" status will now be passed through to
of_device_add() along with "okay" ones so that the driver core is
aware of their existence and drivers can be explicitly bound to them
when appropriate.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
drivers/of/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 74afbb7a4f5e..060e1e9058c2 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -170,7 +170,7 @@ static struct platform_device *of_platform_device_create_pdata(
{
struct platform_device *dev;

- if (!of_device_is_available(np) ||
+ if ((!of_device_is_available(np) && !of_device_is_reserved(np)) ||
of_node_test_and_set_flag(np, OF_POPULATED))
return NULL;

--
2.33.1