From patchwork Tue Aug 12 16:14:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 35286 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f198.google.com (mail-pd0-f198.google.com [209.85.192.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 479DC203C5 for ; Tue, 12 Aug 2014 16:14:51 +0000 (UTC) Received: by mail-pd0-f198.google.com with SMTP id fp1sf66244350pdb.9 for ; Tue, 12 Aug 2014 09:14:50 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=MRyumSvOJVIqT9D11mo4jmCa9uyCj5vJiN5oeA5B3oM=; b=RXGjqUwj+BDm2+dvTzLWEB2iplzAc09GF9Ohp7lHj7eWvZPdh5wUJVpkSO5qr0ZKsf tyIrRK/ZVRjGaapSTbaXeswuvRk1AcIMQYitYgirs5hE3l5Op2EjpAXn+7XXNBp5Dk29 +SobsswPenTpUdVvMiWrz1fvHIA+LVv5lA60cFveMXdvRKZO0IZRv67fZDH/kC0fnLHj 0PJza4K9fk1levDk6SiyACxl70+5bitkn3H77GhVZNtE1382aoxlSC3I18/+50j3/pFi sOdkZDaRwyRYPvDRM49z6qYxBCx2pAnRs+7dvVccleSIgnkflLCqTjzVUpAe1zC+EYz/ xRxg== X-Gm-Message-State: ALoCoQnHMVB2HgxCxTPvjj4F6JKkqf6/yFEa3omxQDG8ZJdotz0JYHENicRKzbnEZvSzAMDLMbkj X-Received: by 10.66.227.37 with SMTP id rx5mr2574761pac.25.1407860090616; Tue, 12 Aug 2014 09:14:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.6 with SMTP id t6ls229948qge.32.gmail; Tue, 12 Aug 2014 09:14:50 -0700 (PDT) X-Received: by 10.220.164.198 with SMTP id f6mr1976566vcy.51.1407860090472; Tue, 12 Aug 2014 09:14:50 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id tb1si8492308vdc.96.2014.08.12.09.14.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 09:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so13587581vcb.30 for ; Tue, 12 Aug 2014 09:14:50 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr1971101vcq.50.1407860090378; Tue, 12 Aug 2014 09:14:50 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp261697vcb; Tue, 12 Aug 2014 09:14:49 -0700 (PDT) X-Received: by 10.180.92.73 with SMTP id ck9mr34327122wib.54.1407860088354; Tue, 12 Aug 2014 09:14:48 -0700 (PDT) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx.google.com with ESMTPS id pm4si31394449wjc.91.2014.08.12.09.14.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 09:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of peter.griffin@linaro.org designates 74.125.82.47 as permitted sender) client-ip=74.125.82.47; Received: by mail-wg0-f47.google.com with SMTP id b13so10068542wgh.18 for ; Tue, 12 Aug 2014 09:14:47 -0700 (PDT) X-Received: by 10.180.14.5 with SMTP id l5mr34338189wic.50.1407860087693; Tue, 12 Aug 2014 09:14:47 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id td10sm57731219wic.10.2014.08.12.09.14.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Aug 2014 09:14:47 -0700 (PDT) From: Peter Griffin To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tgih.jun@samsung.com, jh80.chung@samsung.com, chris@printf.net, ulf.hansson@linaro.org, jarkko.lavinen@nokia.com, balajitk@ti.com, baohua@kernel.org, viresh.linux@gmail.com, ian.molton@codethink.co.uk, maxime.ripard@free-electrons.com, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org, spear-devel@list.st.com, linux-tegra@vger.kernel.org, michal.simek@xilinx.com, swarren@wwwdotorg.org Cc: peter.griffin@linaro.org, patches@linaro.org, lee.jones@linaro.org Subject: [PATCH 5/5] mmc: sdhci-acpi.c: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Date: Tue, 12 Aug 2014 17:14:29 +0100 Message-Id: <1407860069-12706-6-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1407860069-12706-1-git-send-email-peter.griffin@linaro.org> References: <1407860069-12706-1-git-send-email-peter.griffin@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This allows us to get rid of the #else condition, as the macro compiles away to nothing if not enabled. Signed-off-by: Peter Griffin --- drivers/mmc/host/sdhci-acpi.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 8ce3c28..3a42540 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -383,20 +383,13 @@ static int sdhci_acpi_runtime_idle(struct device *dev) return 0; } -#else - -#define sdhci_acpi_runtime_suspend NULL -#define sdhci_acpi_runtime_resume NULL -#define sdhci_acpi_runtime_idle NULL - #endif static const struct dev_pm_ops sdhci_acpi_pm_ops = { .suspend = sdhci_acpi_suspend, .resume = sdhci_acpi_resume, - .runtime_suspend = sdhci_acpi_runtime_suspend, - .runtime_resume = sdhci_acpi_runtime_resume, - .runtime_idle = sdhci_acpi_runtime_idle, + SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend, + sdhci_acpi_runtime_resume, sdhci_acpi_runtime_idle) }; static struct platform_driver sdhci_acpi_driver = {