Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2255778imm; Thu, 7 Jun 2018 07:47:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIIZpgoVLWLEgnYAzA7gtcIPX/UMN+0wU4ecW400ZoVwJOq1FaWQMb8jZFozsxWrY50Cqnl X-Received: by 2002:a17:902:7686:: with SMTP id m6-v6mr2383179pll.340.1528382856270; Thu, 07 Jun 2018 07:47:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528382856; cv=none; d=google.com; s=arc-20160816; b=p107QfqvyDaTedDwWRdllHAVQh7HYgeR2S35dpBgIiYOQWGOVQR/p2L601wloRqT4/ zed4SsmOfYD1ayz6FcVQcYrby3227VuTqxWOn6BoH9h2LfbHPelF7AzNE3VNDWd+bKl+ DpipWxhMdNToWaaRZsNeVHs6BDf18yG/aqw5HsfhSygWsmjddEukmetf5aRBNCaX30lz r73Bn+l5X4A6EL7ZmBOWNPnF9TFXj4t5H3pEYqfaNCDVUy5K//VoAc520uwSa66wQhYF hbz7IK9FL5z0zkEw8aR0tjwEvnLbqxamc38xspudfNvLUikziMILCzixcv6udOxW/pT4 KzVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=VfCXXGHIThrvccjombtxnC13+VkL2UcpDfuVeo/CMzc=; b=e3LD+z5tS7MBVovf3wlRO5p4L9O1dJGuzZjE+kppSXgC6NK/z0QjRXz6jAJKVJk1vu WxgqrtZ/8mrmPrQQb5jZUvcz2a097+GU5NWMcTJ7srK1VHpz/B0J+VT/SDjvncci6/xY Zyo3RDfEqAaOa4vaXQCthRYCNpV8gvSfgxkylARrvlye9RnpsBRsAHsGTLINACwWk0OP pyXwX0wYZY8z6uhoYYc04fVst76iqIPt/e37rUn7kCTaKLr/4lVIt53k1xdSIPXSKYux auINXt3LPPxGuBnMK//cTjb7PFgjtyt25l3OiOlPkKUPJf9lnYt3rbfZI7XYP66Vbbn4 JxTQ== 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 r189-v6si13551892pgr.500.2018.06.07.07.47.21; Thu, 07 Jun 2018 07:47:36 -0700 (PDT) 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 S934964AbeFGOpO (ORCPT + 99 others); Thu, 7 Jun 2018 10:45:14 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40733 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934948AbeFGOpF (ORCPT ); Thu, 7 Jun 2018 10:45:05 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbj-0005Zx-9n; Thu, 07 Jun 2018 15:09:43 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb5-0002yu-I0; Thu, 07 Jun 2018 15:09:03 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "James Hogan" , linux-mips@linux-mips.org, "Ralf Baechle" , "Matt Redfearn" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 193/410] MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Matt Redfearn commit 0cde5b44a30f1daaef1c34e08191239dc63271c4 upstream. 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") Signed-off-by: Matt Redfearn Reviewed-by: James Hogan Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/18544/ Signed-off-by: James Hogan Signed-off-by: Ben Hutchings --- arch/mips/txx9/rbtx4939/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c @@ -186,7 +186,7 @@ static void __init rbtx4939_update_ioc_p #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; @@ -262,7 +262,7 @@ static inline void rbtx4939_led_setup(vo 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 */