lkml.org 
[lkml]   [2020]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH leds v2 03/50] leds: fsg: compile if COMPILE_TEST=y
Date
This driver can be compiled on other platforms with small change if
COMPILE_TEST=y.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Rod Whitby <rod@whitby.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
\
 
 \ /
  Last update: 2020-09-18 00:37    [W:0.344 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site