From patchwork Sun Jun 9 19:10:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 2694721 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 22E0440213 for ; Sun, 9 Jun 2013 19:06:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751433Ab3FITG5 (ORCPT ); Sun, 9 Jun 2013 15:06:57 -0400 Received: from smtp-out-250.synserver.de ([212.40.185.250]:1036 "EHLO smtp-out-250.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751488Ab3FITG4 (ORCPT ); Sun, 9 Jun 2013 15:06:56 -0400 Received: (qmail 9222 invoked by uid 0); 9 Jun 2013 19:06:50 -0000 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@laprican.de X-SynServer-PPID: 8900 Received: from ppp-188-174-124-32.dynamic.mnet-online.de (HELO lars-laptop.fritz.box) [188.174.124.32] by 217.119.54.87 with SMTP; 9 Jun 2013 19:06:50 -0000 From: Lars-Peter Clausen To: Chris Ball Cc: Paul Cercueil , Maarten ter Huurne , linux-mmc@vger.kernel.org, Lars-Peter Clausen Subject: [PATCH 4/6] mmc: jz4740: Use SIMPLE_DEV_PM_OPS Date: Sun, 9 Jun 2013 21:10:03 +0200 Message-Id: <1370805005-8104-4-git-send-email-lars@metafoo.de> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1370805005-8104-1-git-send-email-lars@metafoo.de> References: <1370805005-8104-1-git-send-email-lars@metafoo.de> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org It's a bit shorter than open-conding it. While we are at it also make jz4740_mmc_pm_ops static. Signed-off-by: Lars-Peter Clausen --- drivers/mmc/host/jz4740_mmc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 3f86592..c97ef6d 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -967,7 +967,7 @@ static int jz4740_mmc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int jz4740_mmc_suspend(struct device *dev) { @@ -991,13 +991,8 @@ static int jz4740_mmc_resume(struct device *dev) return 0; } -const struct dev_pm_ops jz4740_mmc_pm_ops = { - .suspend = jz4740_mmc_suspend, - .resume = jz4740_mmc_resume, - .poweroff = jz4740_mmc_suspend, - .restore = jz4740_mmc_resume, -}; - +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