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: <20200917223338.14164-4-marek.behun@nic.cz>
Date:   Fri, 18 Sep 2020 00:32:51 +0200
From:   Marek Behún <marek.behun@....cz>
To:     linux-leds@...r.kernel.org
Cc:     Pavel Machek <pavel@....cz>, Dan Murphy <dmurphy@...com>,
        Ondřej Jirman <megous@...ous.com>,
        linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
        devicetree@...r.kernel.org,
        Marek Behún <marek.behun@....cz>,
        Rod Whitby <rod@...tby.id.au>
Subject: [PATCH leds v2 03/50] leds: fsg: compile if COMPILE_TEST=y

This driver can be compiled on other platforms with small change if
COMPILE_TEST=y.

Signed-off-by: Marek Behún <marek.behun@....cz>
Cc: Pavel Machek <pavel@....cz>
Cc: Dan Murphy <dmurphy@...com>
Cc: Rod Whitby <rod@...tby.id.au>
---
 drivers/leds/Kconfig    | 2 +-
 drivers/leds/leds-fsg.c | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index a008170e73cd8..7f3d16d4f0652 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -290,7 +290,7 @@ config LEDS_NET48XX
 config LEDS_FSG
 	tristate "LED Support for the Freecom FSG-3"
 	depends on LEDS_CLASS
-	depends on MACH_FSG
+	depends on MACH_FSG || COMPILE_TEST
 	help
 	  This option enables support for the LEDs on the Freecom FSG-3.
 
diff --git a/drivers/leds/leds-fsg.c b/drivers/leds/leds-fsg.c
index bc6b420637d61..1ffb34baee341 100644
--- a/drivers/leds/leds-fsg.c
+++ b/drivers/leds/leds-fsg.c
@@ -16,7 +16,13 @@
 #include <linux/leds.h>
 #include <linux/module.h>
 #include <linux/io.h>
+
+#if IS_ENABLED(MACH_FSG)
 #include <mach/hardware.h>
+#else
+/* for COMPILE_TEST */
+#define IXP4XX_EXP_BUS_BASE(x) (0x12345678 + (x))
+#endif
 
 #define FSG_LED_WLAN_BIT	0
 #define FSG_LED_WAN_BIT		1
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ