From patchwork Thu Sep 17 22:32:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 255384 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0280FC43465 for ; Thu, 17 Sep 2020 22:37:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4294208DB for ; Thu, 17 Sep 2020 22:37:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="YmZAuXUK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbgIQWg7 (ORCPT ); Thu, 17 Sep 2020 18:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbgIQWd4 (ORCPT ); Thu, 17 Sep 2020 18:33:56 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA921C06174A; Thu, 17 Sep 2020 15:33:55 -0700 (PDT) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:cac7:3539:7f1f:463]) by mail.nic.cz (Postfix) with ESMTP id 498E0140A75; Fri, 18 Sep 2020 00:33:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1600382033; bh=LCbu6+SF9pg2hwGFGY/TLzTM7tBJKXuL6iP8UeZY++4=; h=From:To:Date; b=YmZAuXUKMg7enG6rXX50aOCM1XrH1jMnzkFvoedfXL+fdcbzAsxTvcrZDahguyEOl 0RIG1YDSm2WhxYWXS6HbOK+M3Njjad5XOjN1qeKWbZ07EihTYSVs41YK7wmy/dV/di Jv/O2SViFPZOWk5vZdTIX8LQLzhLHlkVXRDD0u9M= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: linux-leds@vger.kernel.org Cc: Pavel Machek , Dan Murphy , =?utf-8?q?On?= =?utf-8?q?d=C5=99ej_Jirman?= , linux-kernel@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org, =?utf-8?q?Marek_Beh=C3=BAn?= , Rod Whitby Subject: [PATCH leds v2 03/50] leds: fsg: compile if COMPILE_TEST=y Date: Fri, 18 Sep 2020 00:32:51 +0200 Message-Id: <20200917223338.14164-4-marek.behun@nic.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200917223338.14164-1-marek.behun@nic.cz> References: <20200917223338.14164-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Spamd-Bar: / X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org This driver can be compiled on other platforms with small change if COMPILE_TEST=y. Signed-off-by: Marek BehĂșn Cc: Pavel Machek Cc: Dan Murphy Cc: Rod Whitby --- 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 #include #include + +#if IS_ENABLED(MACH_FSG) #include +#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