lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240923094249.80399-3-chentao@kylinos.cn>
Date: Mon, 23 Sep 2024 17:42:48 +0800
From: Kunwu Chan <chentao@...inos.cn>
To: linux@...linux.org.uk,
	robh@...nel.org,
	saravanak@...gle.com
Cc: linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org,
	Kunwu Chan <chentao@...inos.cn>
Subject: [PATCH 2/2] of/platform: PCI: Use dev_is_platform/dev_is_amba to identify platform/amba devices

Use dev_is_platform()/dev_is_amba() instead of checking bus type directly.

Signed-off-by: Kunwu Chan <chentao@...inos.cn>
---
 drivers/of/platform.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 9bafcff3e628..1937cbef55ee 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -619,10 +619,10 @@ 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)
+	else if (dev_is_amba(dev))
 		amba_device_unregister(to_amba_device(dev));
 #endif
 
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ