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: 20606 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f200.google.com (mail-ye0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E82824687 for ; Thu, 26 Sep 2013 14:55:50 +0000 (UTC) Received: by mail-ye0-f200.google.com with SMTP id r5sf1031796yen.11 for ; Thu, 26 Sep 2013 07:55:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=49V3Fv7vdtISgb+h8RyDNg07x8fpc4xZ+fsgIWwR4So=; b=PY6hF8od2jXaj/Fs1vJ7eNw2/2ECzC4EST0JKv0b2mplKTPMV+NodSWhPI+49xvtjS cxNeybdbe16Pm4XV3PPM8qrh1mQx3DDBFuB2g2ZVUcpZBWj8F0nVASck4fWLo1xFW/LC 2FYXfgpz/XzQgvKcx2xSScVXSENmMUP+5ZiKX0u6X7ZUEVGUZl1pFpGASfqeuy3Ey8am vP1HIiNWdWtM4RrgchPiyZoHWQXGiUCCViU5/PEgg6OlK6Nb0k2JdF8evLD5TV2eyZQZ ZQFyP76zhoebblAzEwKVjrUR7IAavoJBJo3QP903M2f7iV7XJZHyZ+b5qQmFc/qpXcwU ep/g== X-Gm-Message-State: ALoCoQl/RrcRFM9EX3u/elpzdXLnkPbZ52R7mwuC01Yblwi3G+pNYBESfUWbOQU3df1UXJ8Gh1YW X-Received: by 10.236.24.195 with SMTP id x43mr255050yhx.3.1380207350271; Thu, 26 Sep 2013 07:55:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.85.200 with SMTP id j8ls913187qez.6.gmail; Thu, 26 Sep 2013 07:55:50 -0700 (PDT) X-Received: by 10.220.16.73 with SMTP id n9mr1055727vca.24.1380207350129; Thu, 26 Sep 2013 07:55:50 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id o3si500465ves.48.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:55:50 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id c14so977938vea.15 for ; Thu, 26 Sep 2013 07:55:20 -0700 (PDT) X-Received: by 10.220.15.132 with SMTP id k4mr72846vca.45.1380207320021; Thu, 26 Sep 2013 07:55:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp371090vcz; Thu, 26 Sep 2013 07:55:19 -0700 (PDT) X-Received: by 10.14.210.8 with SMTP id t8mr1856186eeo.39.1380207319079; Thu, 26 Sep 2013 07:55:19 -0700 (PDT) Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by mx.google.com with ESMTPS id 7si1834710eeo.259.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:55:19 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.52 is neither permitted nor denied by best guess record for domain of ulf.hansson@linaro.org) client-ip=74.125.83.52; Received: by mail-ee0-f52.google.com with SMTP id c41so602752eek.25 for ; Thu, 26 Sep 2013 07:55:18 -0700 (PDT) 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: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Chris Ball Cc: Ulf Hansson , Sekhar Nori , "Manjunathappa, Prakash" , davinci-linux-open-source@linux.davincidsp.com 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 = {