From patchwork Sat Aug 10 15:20:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 2842445 Return-Path: X-Original-To: patchwork-linux-arm-msm@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 92C5F9F271 for ; Sat, 10 Aug 2013 15:29:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83A092029B for ; Sat, 10 Aug 2013 15:29:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B48D6201FB for ; Sat, 10 Aug 2013 15:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934300Ab3HJP3z (ORCPT ); Sat, 10 Aug 2013 11:29:55 -0400 Received: from qmta10.emeryville.ca.mail.comcast.net ([76.96.30.17]:45889 "EHLO qmta10.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934390Ab3HJP3y (ORCPT ); Sat, 10 Aug 2013 11:29:54 -0400 Received: from omta06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by qmta10.emeryville.ca.mail.comcast.net with comcast id B2wP1m00116AWCUAA3NooJ; Sat, 10 Aug 2013 15:22:48 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by omta06.emeryville.ca.mail.comcast.net with comcast id B3Nm1m00m0MU7Qa8S3Nnbn; Sat, 10 Aug 2013 15:22:48 +0000 Received: from orthanc.internal (orthanc.internal [192.168.1.24]) by mail.gonehiking.org (Postfix) with ESMTP id CFED8801F6; Sat, 10 Aug 2013 09:23:02 -0600 (MDT) From: Shuah Khan To: davidb@codeaurora.org, dwalker@fifo99.com, bryanh@codeaurora.org, cjb@laptop.org Cc: Shuah Khan , linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, shuahkhan@gmail.com Subject: [PATCH] mmc:msmsdcc change driver to use dev_pm_ops infrastructure Date: Sat, 10 Aug 2013 09:20:51 -0600 Message-Id: <1376148055-2539-6-git-send-email-shuah.kh@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1376148055-2539-1-git-send-email-shuah.kh@samsung.com> References: <1376148055-2539-1-git-send-email-shuah.kh@samsung.com> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1376148168; bh=Ql3ZdIlduRksGmI6f5rQyYuUvkpvgUJcZmqG9ojl+CI=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=QntrdTygIau/UkAd7+m5783HUzVOPIcXgf9272yYT2Iw3Q75M5aMF6mosCauXwLWl Zh74TAU9jmx3r8TyxTr+t8oFobZ4WMz1hER3KWuT7WhF3lTJ9IGWViT17djhEMSSW8 lUapHSAPy7rriXPBLIYiLYtXmmGmUgk8x7b1yr4JixarFDL+2HfXUmV3Id2W/BqShX uLdCDxZJuwT4zWn+bY3OKXEyBIkNdRhdGJ0R76zbp/AELnLHOIaOjGjRfwbtfpdUJK r/RY5v7pmA5ZMvgHJgaNAF0J81+5Ki5rsAxhHa+jPOVWheEsu36tN5B7dPoItMu4CU veHIt9GAPtLmg== Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Change msmsdcc platform driver to register pm ops using dev_pm_ops instead of legacy pm_ops infrastructure. Signed-off-by: Shuah Khan --- drivers/mmc/host/msm_sdcc.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index b900de4..017c9d7 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c @@ -1434,9 +1434,9 @@ do_resume_work(struct work_struct *work) static int -msmsdcc_suspend(struct platform_device *dev, pm_message_t state) +msmsdcc_suspend(struct device *dev) { - struct mmc_host *mmc = mmc_get_drvdata(dev); + struct mmc_host *mmc = mmc_get_drvdata(to_platform_device(dev)); int rc = 0; if (mmc) { @@ -1456,9 +1456,9 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state) } static int -msmsdcc_resume(struct platform_device *dev) +msmsdcc_resume(struct device *dev) { - struct mmc_host *mmc = mmc_get_drvdata(dev); + struct mmc_host *mmc = mmc_get_drvdata(to_platform_device(dev)); if (mmc) { struct msmsdcc_host *host = mmc_priv(mmc); @@ -1482,12 +1482,13 @@ msmsdcc_resume(struct platform_device *dev) #define msmsdcc_resume 0 #endif +static SIMPLE_DEV_PM_OPS(msmdcc_dev_pm_ops, msmsdcc_suspend, msmsdcc_resume); + static struct platform_driver msmsdcc_driver = { .probe = msmsdcc_probe, - .suspend = msmsdcc_suspend, - .resume = msmsdcc_resume, .driver = { .name = "msm_sdcc", + .pm = &msmdcc_dev_pm_ops, }, };