[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240827094403.166238-1-kunwu.chan@linux.dev>
Date: Tue, 27 Aug 2024 17:44:02 +0800
From: Kunwu Chan <kunwu.chan@...ux.dev>
To: robh@...nel.org,
saravanak@...gle.com
Cc: devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH] of/platform: Use dev_is_platform() to identify PCI devices
From: Kunwu Chan <chentao@...inos.cn>
Use dev_is_platform() instead of checking bus type directly.
Signed-off-by: Kunwu Chan <chentao@...inos.cn>
---
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 86be4dfb9323..3696140bae9e 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -625,7 +625,7 @@ int of_platform_device_destroy(struct device *dev, void *data)
of_node_clear_flag(dev->of_node, OF_POPULATED);
of_node_clear_flag(dev->of_node, OF_POPULATED_BUS);
- if (dev->bus == &platform_bus_type)
+ if (dev_is_platform(dev))
platform_device_unregister(to_platform_device(dev));
#ifdef CONFIG_ARM_AMBA
else if (dev->bus == &amba_bustype)
--
2.41.0
Powered by blists - more mailing lists