From patchwork Thu Sep 26 14:54:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 2989431 Return-Path: X-Original-To: patchwork-davinci@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 9139CBFF0B for ; Fri, 4 Oct 2013 16:43:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E1C020324 for ; Fri, 4 Oct 2013 16:43:11 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D555201B9 for ; Fri, 4 Oct 2013 16:43:10 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r94GfnBM004305; Fri, 4 Oct 2013 11:41:49 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r94Gfn5k030317; Fri, 4 Oct 2013 11:41:49 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Fri, 4 Oct 2013 11:41:49 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id r94GfnX8011323; Fri, 4 Oct 2013 11:41:49 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id E30798062B; Fri, 4 Oct 2013 11:41:48 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 6235380626 for ; Thu, 26 Sep 2013 09:55:22 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r8QEtMeQ018091 for ; Thu, 26 Sep 2013 09:55:22 -0500 (CDT) Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r8QEtLLh017233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Sep 2013 09:55:21 -0500 Received: from [216.82.242.131:42881] by server-15.bemta-8.messagelabs.com id 5B/1C-11655-9DA44425; Thu, 26 Sep 2013 14:55:21 +0000 X-Env-Sender: ulf.hansson@linaro.org X-Msg-Ref: server-16.tower-76.messagelabs.com!1380207319!35763457!1 X-Originating-IP: [209.85.215.178] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 6.9.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22983 invoked from network); 26 Sep 2013 14:55:20 -0000 Received: from mail-ea0-f178.google.com (HELO mail-ea0-f178.google.com) (209.85.215.178) by server-16.tower-76.messagelabs.com with RC4-SHA encrypted SMTP; 26 Sep 2013 14:55:20 -0000 Received: by mail-ea0-f178.google.com with SMTP id a15so614078eae.9 for ; Thu, 26 Sep 2013 07:55:18 -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=49V3Fv7vdtISgb+h8RyDNg07x8fpc4xZ+fsgIWwR4So=; b=ZcfB9vwotrPWhJsAzpLIjrZKTmQKKyuXkL73tX9pKht3GYq/wJean9Zn6b1/Ho/vL/ jGh9ax/ZfS6EhJAQ9JzFsmYHjzRlE3l9C8uZnGr8CvpZuMomCU1KxscJ3Mak1p5LQ+jX A+zfoBJJXwhgSJ2yusbge0GLj356Sing1vWSlA1ltnRy9IKDQnDLBpOHSa5o6tgDXXpM EPydVW1CvIw78iW6WeNXXcJgcrLS6zXPtirjca1iQJ1J3YNG5QLryBw1XD3gAP7ypntz pTbqr8J803EcFgPsdj/zWz5dygrYYNCh3dw1CAyzTXohHJq94RbE5zZPz5OYjFIRwPiO L+Lg== X-Gm-Message-State: ALoCoQmnoDN7AR2gIFv2CyX3K7YyEFWR7P34TSbLOdlXX1JKkc9izL1LvrOeeZdX37qhy7AkmjsE X-Received: by 10.14.211.4 with SMTP id v4mr1841944eeo.81.1380207318536; Thu, 26 Sep 2013 07:55:18 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id x47sm4813555eea.16.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:55:17 -0700 (PDT) From: Ulf Hansson To: , , Chris Ball Subject: [PATCH 05/27] mmc: davinci_mmc: Move away from using deprecated APIs Date: Thu, 26 Sep 2013 16:54:30 +0200 Message-ID: <1380207292-16968-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380207292-16968-1-git-send-email-ulf.hansson@linaro.org> References: <1380207292-16968-1-git-send-email-ulf.hansson@linaro.org> X-Mailman-Approved-At: Fri, 04 Oct 2013 11:41:46 -0500 CC: , Ulf Hansson X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Suspend and resume of cards are being handled from the protocol layer and consequently the mmc_suspend|resume_host APIs are deprecated. This means we can simplify the suspend|resume callbacks by removing the use of the deprecated APIs. Cc: Sekhar Nori Cc: Manjunathappa, Prakash Cc: davinci-linux-open-source@linux.davincidsp.com Signed-off-by: Ulf Hansson --- drivers/mmc/host/davinci_mmc.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c index e9fa87d..d615374 100644 --- a/drivers/mmc/host/davinci_mmc.c +++ b/drivers/mmc/host/davinci_mmc.c @@ -193,7 +193,6 @@ struct mmc_davinci_host { #define DAVINCI_MMC_DATADIR_READ 1 #define DAVINCI_MMC_DATADIR_WRITE 2 unsigned char data_dir; - unsigned char suspended; /* buffer is used during PIO of one scatterlist segment, and * is updated along with buffer_bytes_left. bytes_left applies @@ -1435,38 +1434,23 @@ static int davinci_mmcsd_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct mmc_davinci_host *host = platform_get_drvdata(pdev); - int ret; - ret = mmc_suspend_host(host->mmc); - if (!ret) { - writel(0, host->base + DAVINCI_MMCIM); - mmc_davinci_reset_ctrl(host, 1); - clk_disable(host->clk); - host->suspended = 1; - } else { - host->suspended = 0; - } + writel(0, host->base + DAVINCI_MMCIM); + mmc_davinci_reset_ctrl(host, 1); + clk_disable(host->clk); - return ret; + return 0; } static int davinci_mmcsd_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct mmc_davinci_host *host = platform_get_drvdata(pdev); - int ret; - - if (!host->suspended) - return 0; clk_enable(host->clk); - mmc_davinci_reset_ctrl(host, 0); - ret = mmc_resume_host(host->mmc); - if (!ret) - host->suspended = 0; - return ret; + return 0; } static const struct dev_pm_ops davinci_mmcsd_pm = {