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-next>] [day] [month] [year] [list]
Date:   Tue,  7 Jan 2020 23:09:31 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Jyri Sarha <jsarha@...com>,
        Kishon Vijay Abraham I <kishon@...com>
Cc:     Arnd Bergmann <arnd@...db.de>, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] of: add dummy of_platform_device_destroy

The new phy-j721e-wiz driver causes a link failure without CONFIG_OF:

drivers/phy/ti/phy-j721e-wiz.o: In function `wiz_remove':
phy-j721e-wiz.c:(.text+0x40): undefined reference to `of_platform_device_destroy'

Add a dummy version of this function to avoid having to add Kconfig
dependencies for the driver.

Fixes: 42440de5438a ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 include/linux/of_platform.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 84a966623e78..2551c263e57d 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -54,11 +54,16 @@ extern struct platform_device *of_device_alloc(struct device_node *np,
 					 struct device *parent);
 #ifdef CONFIG_OF
 extern struct platform_device *of_find_device_by_node(struct device_node *np);
+extern int of_platform_device_destroy(struct device *dev, void *data);
 #else
 static inline struct platform_device *of_find_device_by_node(struct device_node *np)
 {
 	return NULL;
 }
+static inline int of_platform_device_destroy(struct device *dev, void *data)
+{
+	return 0;
+}
 #endif
 
 /* Platform devices and busses creation */
-- 
2.20.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ