Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2170615imm; Mon, 28 May 2018 03:08:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp1AZoS8mi/e6C0UGYyBRXrpYWv+wy+qMciB0286PdiH4uUR3Pd8ptQbAa479Ybs8ddJpLI X-Received: by 2002:a62:1549:: with SMTP id 70-v6mr12900637pfv.91.1527502123167; Mon, 28 May 2018 03:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527502123; cv=none; d=google.com; s=arc-20160816; b=W9yt0+bqpVIHx/26d047YfERJ8Q3NNOOLAX9+unmLQTFa8fBNGEU+xrO3PCAAyylS+ qVwv3K/ncMGnMTSVfuDoPmffRv7bCG699u8alHgczmYGX8iat2/i85AdpDYPgIy0nOCK yX5e0t3vUPxM6SM0ihPsC0dYkz4U6U63hJdwl9HR7xVDR5kHJzJDFRTEU2xFttHnB6wG 6k7Hvtl6G2TB9932aP48LPr9noF+H9qDFAgO+Ic5wLh/r906vTWxLpdnS5GCfN4Jgo8K wh5vcC1bJDaWDS3rn1GcqJlKZmAap2BUExeUobMpEgmsKDJ6WFvR6EfYmEAL8hfqea00 uKEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=32IYbKh4Ek7kIBGM0MqY73TG7OY1xzlt5JeIkW6ZZDU=; b=ptqCeObYfioenBexzagr6rd84u+5uuHV33aRIbTAJtfX8jpOJ5RL56i0pLrn3+KHod RnZzbGygQ1vqwLB8LyjKIIm2ofiCtzCybgTztxKLNi1jLf9iDBHdaO6eANtGTWWddHic At3yljcNzw3iHGHoW65ZfpJJzvHIo4HS/M+DfPOdblNyFwITeaokzlBbjCIJDLA1lBEa 3Z3bNM0ymYRX+m2GGL56KjvmejqzoehrqyqNlen2y1Vww3ZR2kmPQSg33+p81l2mJ+/T 97hAKnoEf/BfldDf67rrP9dblzxX1hYUowugSb4wlsR7btKiRHm2QB4jjm9VnGHg2Sjo exew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fv0LmXnn; 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 j4-v6si28564475plt.430.2018.05.28.03.08.28; Mon, 28 May 2018 03:08:43 -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; dkim=pass header.i=@kernel.org header.s=default header.b=fv0LmXnn; 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 S933952AbeE1KIF (ORCPT + 99 others); Mon, 28 May 2018 06:08:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:56072 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933859AbeE1KIB (ORCPT ); Mon, 28 May 2018 06:08:01 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 73175206B7; Mon, 28 May 2018 10:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527502081; bh=+o9JfQTJPBBUxppAH6jpMRxp8rHo5AXiIQoY7CEB4Tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fv0LmXnnyFofoBaqwLOiJGrweXhNiOJotV15xwqKPU9gZ1kIiNP4ZvqKue8DhbK4R ZwdCxJS7SJMnfOxeQxbE+An80HeTAEfbPcGvhX9dIV5PuXEatcgil9uo0B09EYxSWA ykqM6ulGv5CHcemXUw9EHFPjaAHYwn7OG5uffNlU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matt Redfearn , James Hogan , Ralf Baechle , linux-mips@linux-mips.org, Sasha Levin Subject: [PATCH 3.18 037/185] MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS Date: Mon, 28 May 2018 12:01:18 +0200 Message-Id: <20180528100053.542387362@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100050.700971285@linuxfoundation.org> References: <20180528100050.700971285@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matt Redfearn [ Upstream commit 0cde5b44a30f1daaef1c34e08191239dc63271c4 ] 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: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- 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 */