From patchwork Thu Apr 14 04:19:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 65776 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp380185qge; Wed, 13 Apr 2016 21:19:11 -0700 (PDT) X-Received: by 10.98.102.195 with SMTP id s64mr14414777pfj.89.1460607551511; Wed, 13 Apr 2016 21:19:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q76si7019997pfa.60.2016.04.13.21.19.11; Wed, 13 Apr 2016 21:19:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbcDNETJ (ORCPT + 2 others); Thu, 14 Apr 2016 00:19:09 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:44612 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750886AbcDNETI (ORCPT ); Thu, 14 Apr 2016 00:19:08 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u3E4IgsL015587; Thu, 14 Apr 2016 13:18:42 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u3E4IgsL015587 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1460607523; bh=ZLajRRO4wI/qUfKe50yrM0WLfxcmA0F1F+EGEWBnmCM=; h=From:To:Cc:Subject:Date:From; b=AiRgi36M7umU63KSQdObPFClpxa9v7c7uNCj1HXg2M6COt1BftafaBmGsQ/rP/GAx NBQpmq5rG88w9nY8C8CnHmY35QaE1rHvtL2jTJHuzhlw8w/MQRmPSvPRE2tKP6GNUs thWTsrcA0RHTBHYTitXNj8E0lCzCMU/2QtxIuH5LyPQsBjgvfyQrJpLyXtj4FZO1iO rg57RHnECD5y5Ll7aMSjPiun0lYxyk47l2OrsBRcyHAawVW3Dq0CrYYlEpuyVWwRX+ qZO/flBPdx8w40D6jAyDe5Ha2kjTC92Qb01ZY4OPB0ZlhDNME/KS1nWGFvhmSaZ0g9 wXiBVVNxivqzQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mmc@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org, Adrian Hunter , Ulf Hansson Subject: [PATCH v2 1/2] mmc: sdhci: use IS_REACHABLE(CONFIG_LEDS_CLASS) to enable LED code Date: Thu, 14 Apr 2016 13:19:39 +0900 Message-Id: <1460607580-22599-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ defined(CONFIG_MMC_SDHCI_MODULE)) is equivalent to: defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ defined(MODULE)) and it can also be written shortly as: IS_REACHABLE(CONFIG_LEDS_CLASS) Signed-off-by: Masahiro Yamada --- Changes in v2: - Rebase on the next branch (7766e58f5be39dcc35d30a703422a3d0b8ec8c0c) drivers/mmc/host/sdhci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index b284924..eedc18a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -259,9 +259,7 @@ static void __sdhci_led_deactivate(struct sdhci_host *host) sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } -#if defined(CONFIG_LEDS_CLASS) || (defined(CONFIG_LEDS_CLASS_MODULE) && \ - defined(CONFIG_MMC_SDHCI_MODULE)) - +#if IS_REACHABLE(CONFIG_LEDS_CLASS) static void sdhci_led_control(struct led_classdev *led, enum led_brightness brightness) {