From patchwork Mon Sep 14 15:01:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 53589 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id C92612056A for ; Mon, 14 Sep 2015 15:02:21 +0000 (UTC) Received: by wisv5 with SMTP id v5sf42463573wis.0 for ; Mon, 14 Sep 2015 08:02:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=EIvh2e9M3swBY2/QCNB79krw9oBDFi37Ui504rPiHZ8=; b=OtqBaLdC+0+WDSenAB3SFOOyxth6NgPPiZ9ZhxTH4C8v0yOSastV7LkRr+/3561i6l 7dScUL8DZxfnRijsh53dKCgrvjFq7oVNdEln0gOJmPTNFVNg448NAzfBcxbDn0kMhixL YMsVPn2YswBJCbiFeEf+iqoEKAUs1rpjxeO3CrkaQWNhrSMbioylI2KqgAH3R/4kcfpn FF9bSY84p7HCNSs8Fg20GYAU+IxZqAfDLlFhRObur7BqLQTiD2VXb5u/qbL+G4eXkgNP H5FOpMcPtF4QxryP3LdC3hKqbSPhNwfJcxM0VANDpxoomFHK70PNX22OUzlMiEpvqSvS 1nrw== X-Gm-Message-State: ALoCoQneMvSOyj7Q9lCEDwBf+6Pr2lqtKuQ223Zy+xc1eedVeapaDutWoOe+eSgQgeDt5Yd78Di2 X-Received: by 10.112.198.33 with SMTP id iz1mr3165961lbc.8.1442242941079; Mon, 14 Sep 2015 08:02:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.25.227 with SMTP id f3ls662368lag.81.gmail; Mon, 14 Sep 2015 08:02:20 -0700 (PDT) X-Received: by 10.112.13.161 with SMTP id i1mr3295272lbc.96.1442242940925; Mon, 14 Sep 2015 08:02:20 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id m1si10011110lag.69.2015.09.14.08.02.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 08:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lamp12 with SMTP id p12so87704810lam.0 for ; Mon, 14 Sep 2015 08:02:20 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr14632857lbb.36.1442242940242; Mon, 14 Sep 2015 08:02:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1248646lbq; Mon, 14 Sep 2015 08:02:19 -0700 (PDT) X-Received: by 10.202.224.130 with SMTP id x124mr11575651oig.110.1442242939255; Mon, 14 Sep 2015 08:02:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si6945235oby.70.2015.09.14.08.02.18; Mon, 14 Sep 2015 08:02:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754172AbbINPCI (ORCPT + 6 others); Mon, 14 Sep 2015 11:02:08 -0400 Received: from foss.arm.com ([217.140.101.70]:46654 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755156AbbINPCH (ORCPT ); Mon, 14 Sep 2015 11:02:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 04E155BC; Mon, 14 Sep 2015 08:02:21 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C36353F57E; Mon, 14 Sep 2015 08:02:05 -0700 (PDT) From: Sudeep Holla To: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org Cc: Sudeep Holla , Lv Zheng , Zhang Rui Subject: [PATCH 2/2] ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED() Date: Mon, 14 Sep 2015 16:01:55 +0100 Message-Id: <1442242915-14762-2-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442242915-14762-1-git-send-email-sudeep.holla@arm.com> References: <1442242915-14762-1-git-send-email-sudeep.holla@arm.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This commit removes all CONFIG_.*{,_MODULE} in ACPI code, replacing it with IS_ENABLED(). Cc: "Rafael J. Wysocki" Cc: Zhang Rui Cc: Lv Zheng Signed-off-by: Sudeep Holla --- drivers/acpi/bus.c | 12 ++++-------- drivers/acpi/int340x_thermal.c | 9 ++++----- include/acpi/button.h | 4 ++-- include/acpi/video.h | 2 +- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 46506e7687cd..a212cefae524 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -315,14 +315,10 @@ static void acpi_bus_osc_support(void) capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE; capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */ -#if defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) ||\ - defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE) - capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT; -#endif - -#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE) - capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT; -#endif + if (IS_ENABLED(CONFIG_ACPI_PROCESSOR_AGGREGATOR)) + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT; + if (IS_ENABLED(CONFIG_ACPI_PROCESSOR)) + capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT; capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; diff --git a/drivers/acpi/int340x_thermal.c b/drivers/acpi/int340x_thermal.c index 6c7c7975f72e..33505c651f62 100644 --- a/drivers/acpi/int340x_thermal.c +++ b/drivers/acpi/int340x_thermal.c @@ -33,13 +33,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = { static int int340x_thermal_handler_attach(struct acpi_device *adev, const struct acpi_device_id *id) { -#if defined(CONFIG_INT340X_THERMAL) || defined(CONFIG_INT340X_THERMAL_MODULE) - acpi_create_platform_device(adev); -#elif defined(CONFIG_INTEL_SOC_DTS_THERMAL) || defined(CONFIG_INTEL_SOC_DTS_THERMAL_MODULE) + if (IS_ENABLED(CONFIG_INT340X_THERMAL)) + acpi_create_platform_device(adev); /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */ - if (id->driver_data == INT3401_DEVICE) + else if (IS_ENABLED(CONFIG_INTEL_SOC_DTS_THERMAL) && + id->driver_data == INT3401_DEVICE) acpi_create_platform_device(adev); -#endif return 1; } diff --git a/include/acpi/button.h b/include/acpi/button.h index 97eea0e4c016..1cad8b2d460c 100644 --- a/include/acpi/button.h +++ b/include/acpi/button.h @@ -3,7 +3,7 @@ #include -#if defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) +#if IS_ENABLED(CONFIG_ACPI_BUTTON) extern int acpi_lid_notifier_register(struct notifier_block *nb); extern int acpi_lid_notifier_unregister(struct notifier_block *nb); extern int acpi_lid_open(void); @@ -20,6 +20,6 @@ static inline int acpi_lid_open(void) { return 1; } -#endif /* defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) */ +#endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */ #endif /* ACPI_BUTTON_H */ diff --git a/include/acpi/video.h b/include/acpi/video.h index e840b294c6f5..c62392d9b52a 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -24,7 +24,7 @@ enum acpi_backlight_type { acpi_backlight_native, }; -#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) +#if IS_ENABLED(CONFIG_ACPI_VIDEO) extern int acpi_video_register(void); extern void acpi_video_unregister(void); extern int acpi_video_get_edid(struct acpi_device *device, int type,