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: 4713361 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB90DC0338 for ; Tue, 12 Aug 2014 16:15:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CFAEC200DF for ; Tue, 12 Aug 2014 16:15:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADD6520148 for ; Tue, 12 Aug 2014 16:15:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753657AbaHLQOv (ORCPT ); Tue, 12 Aug 2014 12:14:51 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:62172 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753641AbaHLQOs (ORCPT ); Tue, 12 Aug 2014 12:14:48 -0400 Received: by mail-we0-f176.google.com with SMTP id q58so10158701wes.7 for ; Tue, 12 Aug 2014 09:14:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MRyumSvOJVIqT9D11mo4jmCa9uyCj5vJiN5oeA5B3oM=; b=iB5xj7QvdLZ1WeuHZ5UcdI1EeBCFHhJv1PEPPZetIQuvhCoUBRejGYZEg0b4nnbT5B psH+f6uSi1m/tkf3pjXpVrTrDLz+yvQBaJgIGZ02uhqnYxqmn+Ei2EN3NkdL8xpDUJea 0EOxDuaJ+3xJ8v4qA3YnXQKNunDrLCdMj6Es9sp49au3izmDqDepPoNyMRm5KN07Z8Zm HxgFk/Gqchhx7L+cgg8gP4Pj+Q1DcBZO/+1jc1nMiPsAc9VMbIBA9Qm3uLbJRn1viLZg ihrUcY9M9rdVENVU/6d9xucjQt1rQTIUWcXXApH854BEAup+YZS2ZyC9UaHRthJ6t175 dMCA== X-Gm-Message-State: ALoCoQn3stPyUZhidRlGq8MZSIag2/oo8t1kmG/uxM9QwOFUIVNyVNw5duefdI4WhvrSidozZdQQ 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 = {