Received: by 10.223.176.5 with SMTP id f5csp2753021wra; Mon, 29 Jan 2018 03:28:23 -0800 (PST) X-Google-Smtp-Source: AH8x226tln7n0Ed+86c3P4SovbWLeTEZyzkg0+vVsRfX3Zxrunsv3ydvbmFmev2Ptr3sYM89mz2m X-Received: by 10.98.89.71 with SMTP id n68mr11527006pfb.121.1517225303756; Mon, 29 Jan 2018 03:28:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517225303; cv=none; d=google.com; s=arc-20160816; b=L0j2EJwlx+1dXsPRQIBMnZ0w5NBDd3usPLy/sxBgB11V+Dn1oN64DjCMR85qlUiMwn B/4xchoRk4ubzXf3Npa7IDhVgAc9Wmj2ASn4pgeK0CEKp4I+pGF6SPC66r+TDYXGmFVv N6djwTdPdS82DvO7KtXWf/FBVU5cjSLRhO5jctR3Nqr723AYHgYdTnnmBL65g0fsm0oX aVp83cLQByE4F06qGZFZRZqn6ejn2yNCWkmCKViZyBRpLsKASImwHv9X4cutn+meSdSK MT8TW80m8AmTsFKLcrgMUOVcenKrDRq5N16Thdvsskq6ON26poMAEXK7ioKFPkAF352T /GFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=mMEzwJy8ZK0r/b9ATlmX5ldG2QOjqe2E+sa+GiYoEJk=; b=fVh9S1tq89pVvV2u3lSPvkOVkW1Ltk+29GVTRIibWePmnEejbroDvRhi8fcGjjN52K CIhptQug9SVpYYgSNBNo2Rw13hfyTmOncrgl1ErVOiBbr11VUIRxWVpp1wVHEHcr75R1 UWtpxU7Q6W/5S4f1DrFN4CJGabH2oYZpAdgOAtrC/q4fCx8Xx3qaw4M7Ql74Xzou46GA n0vs9fByy9JLIOGseDBn98YGbE2FMW8W0pQwMM/DyLNu5s9YYI/ajMzfThD3dncbtJSj +nz3eCTxHS4ljXBcnCyv4IK52QxycYDdC0aLZn/IqnylQoVY8Lv+NHqSRONNmrhGh4Fj 3xvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y128si7348193pgb.55.2018.01.29.03.28.08; Mon, 29 Jan 2018 03:28:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751702AbeA2L1o (ORCPT + 99 others); Mon, 29 Jan 2018 06:27:44 -0500 Received: from 9pmail.ess.barracuda.com ([64.235.150.225]:50515 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbeA2L1n (ORCPT ); Mon, 29 Jan 2018 06:27:43 -0500 Received: from MIPSMAIL01.mipstec.com (mailrelay.mips.com [12.201.5.28]) by mx1.ess.sfj.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Mon, 29 Jan 2018 11:27:36 +0000 Received: from mredfearn-linux.mipstec.com (10.150.130.83) by MIPSMAIL01.mipstec.com (10.20.43.31) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 29 Jan 2018 03:26:53 -0800 From: Matt Redfearn To: Ralf Baechle , James Hogan CC: , Matt Redfearn , Subject: [PATCH] MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS Date: Mon, 29 Jan 2018 11:26:45 +0000 Message-ID: <1517225205-10374-1-git-send-email-matt.redfearn@mips.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.150.130.83] X-BESS-ID: 1517225254-298552-13691-7957-8 X-BESS-VER: 2018.1-r1801290438 X-BESS-Apparent-Source-IP: 12.201.5.28 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.189472 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When commit b27311e1cace ("MIPS: TXx9: Add RBTX4939 board support") added board support for the RBTX4939, it added a call to led_classdev_register even if the LED class is built as a module. Built-in arch code cannot call module code directly like this. Commit b33b44073734 ("MIPS: TXX9: use IS_ENABLED() macro") subsequently changed the inclusion of this code to a single check that CONFIG_LEDS_CLASS is either builtin or a module, but the same issue remains. This leads to MIPS allmodconfig builds failing when CONFIG_MACH_TX49XX=y is set: arch/mips/txx9/rbtx4939/setup.o: In function `rbtx4939_led_probe': setup.c:(.init.text+0xc0): undefined reference to `of_led_classdev_register' make: *** [Makefile:999: vmlinux] Error 1 Fix this by using the IS_BUILTIN() macro instead. Fixes: b27311e1cace ("MIPS: TXx9: Add RBTX4939 board support") Fixes: b33b44073734 ("MIPS: TXX9: use IS_ENABLED() macro") Signed-off-by: Matt Redfearn --- arch/mips/txx9/rbtx4939/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index 8b937300fb7f..fd26fadc8617 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c @@ -186,7 +186,7 @@ static void __init rbtx4939_update_ioc_pen(void) #define RBTX4939_MAX_7SEGLEDS 8 -#if IS_ENABLED(CONFIG_LEDS_CLASS) +#if IS_BUILTIN(CONFIG_LEDS_CLASS) static u8 led_val[RBTX4939_MAX_7SEGLEDS]; struct rbtx4939_led_data { struct led_classdev cdev; @@ -261,7 +261,7 @@ static inline void rbtx4939_led_setup(void) static void __rbtx4939_7segled_putc(unsigned int pos, unsigned char val) { -#if IS_ENABLED(CONFIG_LEDS_CLASS) +#if IS_BUILTIN(CONFIG_LEDS_CLASS) unsigned long flags; local_irq_save(flags); /* bit7: reserved for LED class */ -- 2.7.4