From patchwork Mon Aug 19 16:16:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 2846600 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 F29989F271 for ; Mon, 19 Aug 2013 16:17:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7199203DF for ; Mon, 19 Aug 2013 16:17:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 50F6C203E5 for ; Mon, 19 Aug 2013 16:16:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751569Ab3HSQQ4 (ORCPT ); Mon, 19 Aug 2013 12:16:56 -0400 Received: from multi.imgtec.com ([194.200.65.239]:41726 "EHLO multi.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751565Ab3HSQQy (ORCPT ); Mon, 19 Aug 2013 12:16:54 -0400 From: James Hogan To: Lars-Peter Clausen CC: James Hogan , Chris Ball , Subject: [PATCH] mmc: jz4740: simplify use of SIMPLE_DEV_PM_OPS Date: Mon, 19 Aug 2013 17:16:40 +0100 Message-ID: <1376929000-12573-1-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Originating-IP: [192.168.154.65] X-SEF-Processed: 7_3_0_01192__2013_08_19_17_16_46 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.7 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 Commit 5d5c035 (mmc: jz4740: Use SIMPLE_DEV_PM_OPS) converted jz4740_mmc to use SIMPLE_DEV_PM_OPS, but it did so within the #ifdef CONFIG_PM_SLEEP. SIMPLE_DEV_PM_OPS already handles when CONFIG_PM_SLEEP is disabled, so move it out of the ifdef and remove the JZ4740_MMC_PM_OPS indirection. Compile tested with CONFIG_PM_SLEEP enabled and disabled. Signed-off-by: James Hogan Cc: Lars-Peter Clausen Cc: Chris Ball Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/jz4740_mmc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 0308c9f..28af392 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -898,13 +898,10 @@ static int jz4740_mmc_resume(struct device *dev) return 0; } +#endif static SIMPLE_DEV_PM_OPS(jz4740_mmc_pm_ops, jz4740_mmc_suspend, jz4740_mmc_resume); -#define JZ4740_MMC_PM_OPS (&jz4740_mmc_pm_ops) -#else -#define JZ4740_MMC_PM_OPS NULL -#endif static struct platform_driver jz4740_mmc_driver = { .probe = jz4740_mmc_probe, @@ -912,7 +909,7 @@ static struct platform_driver jz4740_mmc_driver = { .driver = { .name = "jz4740-mmc", .owner = THIS_MODULE, - .pm = JZ4740_MMC_PM_OPS, + .pm = &jz4740_mmc_pm_ops, }, };