From patchwork Tue Aug 12 16:14:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 4713421 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0B3749F3EC for ; Tue, 12 Aug 2014 16:15:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08CA5200DF for ; Tue, 12 Aug 2014 16:15:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DFF78200E3 for ; Tue, 12 Aug 2014 16:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753577AbaHLQPe (ORCPT ); Tue, 12 Aug 2014 12:15:34 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:61471 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753574AbaHLQOo (ORCPT ); Tue, 12 Aug 2014 12:14:44 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so10277927wgg.24 for ; Tue, 12 Aug 2014 09:14:43 -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=u/bWR2qWyO6M3uqFnePA8Zv9CsZt9QKqPlOF4BKTUIU=; b=jN6ad6z1+phkaT5/9QL5JFlwgLztHfJjo4DxQWHwhSk2U+W/4oVuUQmz0oMAry5Xgq d6Ir1xWku63CWKazXL4Bl0IupO+LEYMaoMD4pjgvOr5KRms2LSfUfLs7+K8pokuw0riy krjvOJfBeLhLbcw4iL4NCjO6kNdah82qdELFh3nv2jQfSnRmIZVTKKP+lTnEHe8/n+Y8 /f3Sx/M2g2vYnAZ66N9QFeAmKb+IkhHFBhzgUnEN7F7Z34RKqgydQU1H16BhYxa1Dyd/ j2BZm/OQ+jF9+yG8S4jUDjIp5BhXp2ajKuM8ZANZ/WpI8nRUQHw9bg3HhTNjuPmItkhz gKRQ== X-Gm-Message-State: ALoCoQnojC85ks0d9oK0oDZabhFvUFXSs9SIXwlrFUnvbhCX3Q1YbRc0IKh5UEv2bqXFNASEMvJG X-Received: by 10.194.189.230 with SMTP id gl6mr6179106wjc.118.1407860083540; Tue, 12 Aug 2014 09:14:43 -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.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Aug 2014 09:14:42 -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 4/5] mmc: sdhci-pci: Use SET_RUNTIME_PM_OPS macro to set runtime pm callbacks Date: Tue, 12 Aug 2014 17:14:28 +0100 Message-Id: <1407860069-12706-5-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=unavailable 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-pci.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 52c42fc..745629d 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -1267,20 +1267,13 @@ static int sdhci_pci_runtime_idle(struct device *dev) return 0; } -#else - -#define sdhci_pci_runtime_suspend NULL -#define sdhci_pci_runtime_resume NULL -#define sdhci_pci_runtime_idle NULL - #endif static const struct dev_pm_ops sdhci_pci_pm_ops = { .suspend = sdhci_pci_suspend, .resume = sdhci_pci_resume, - .runtime_suspend = sdhci_pci_runtime_suspend, - .runtime_resume = sdhci_pci_runtime_resume, - .runtime_idle = sdhci_pci_runtime_idle, + SET_RUNTIME_PM_OPS(sdhci_pci_runtime_suspend, + sdhci_pci_runtime_resume, sdhci_pci_runtime_idle) }; /*****************************************************************************\