linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	Chris Ball <cjb@laptop.org>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Ludovic Desroches <ludovic.desroches@atmel.com>
Subject: [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks
Date: Thu, 26 Sep 2013 16:54:26 +0200	[thread overview]
Message-ID: <1380207292-16968-2-git-send-email-ulf.hansson@linaro.org> (raw)
In-Reply-To: <1380207292-16968-1-git-send-email-ulf.hansson@linaro.org>

Suspend and resume of cards are handled by the protocol layer and
consequently the mmc_suspend|resume_host APIs are marked as deprecated.

While moving away from using the deprecated APIs, there are nothing
left to be done for the suspend and resume callbacks, so remove them.

Cc: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/atmel-mci.c |   61 ------------------------------------------
 1 file changed, 61 deletions(-)

diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 92c1877..2cbb451 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -255,7 +255,6 @@ struct atmel_mci_slot {
 #define ATMCI_CARD_PRESENT	0
 #define ATMCI_CARD_NEED_INIT	1
 #define ATMCI_SHUTDOWN		2
-#define ATMCI_SUSPENDED		3
 
 	int			detect_pin;
 	int			wp_pin;
@@ -2529,70 +2528,10 @@ static int __exit atmci_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int atmci_suspend(struct device *dev)
-{
-	struct atmel_mci *host = dev_get_drvdata(dev);
-	int i;
-
-	 for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
-		struct atmel_mci_slot *slot = host->slot[i];
-		int ret;
-
-		if (!slot)
-			continue;
-		ret = mmc_suspend_host(slot->mmc);
-		if (ret < 0) {
-			while (--i >= 0) {
-				slot = host->slot[i];
-				if (slot
-				&& test_bit(ATMCI_SUSPENDED, &slot->flags)) {
-					mmc_resume_host(host->slot[i]->mmc);
-					clear_bit(ATMCI_SUSPENDED, &slot->flags);
-				}
-			}
-			return ret;
-		} else {
-			set_bit(ATMCI_SUSPENDED, &slot->flags);
-		}
-	}
-
-	return 0;
-}
-
-static int atmci_resume(struct device *dev)
-{
-	struct atmel_mci *host = dev_get_drvdata(dev);
-	int i;
-	int ret = 0;
-
-	for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
-		struct atmel_mci_slot *slot = host->slot[i];
-		int err;
-
-		slot = host->slot[i];
-		if (!slot)
-			continue;
-		if (!test_bit(ATMCI_SUSPENDED, &slot->flags))
-			continue;
-		err = mmc_resume_host(slot->mmc);
-		if (err < 0)
-			ret = err;
-		else
-			clear_bit(ATMCI_SUSPENDED, &slot->flags);
-	}
-
-	return ret;
-}
-#endif
-
-static SIMPLE_DEV_PM_OPS(atmci_pm, atmci_suspend, atmci_resume);
-
 static struct platform_driver atmci_driver = {
 	.remove		= __exit_p(atmci_remove),
 	.driver		= {
 		.name		= "atmel_mci",
-		.pm		= &atmci_pm,
 		.of_match_table	= of_match_ptr(atmci_dt_ids),
 	},
 };
-- 
1.7.9.5


  reply	other threads:[~2013-09-26 14:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
2013-09-26 14:54 ` Ulf Hansson [this message]
2013-09-26 14:54 ` [PATCH 02/27] mmc: au1xmmc: Move away from using deprecated APIs Ulf Hansson
2013-09-26 14:54 ` [PATCH 03/27] mmc: bfin_sdh: " Ulf Hansson
2013-10-08  3:05   ` Sonic Zhang
2013-09-26 14:54 ` [PATCH 04/27] mmc: cb710: " Ulf Hansson
2013-09-27 16:08   ` Michał Mirosław
2013-09-26 14:54 ` [PATCH 05/27] mmc: davinci_mmc: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 06/27] mmc: dw_mmc: " Ulf Hansson
2013-10-23 11:17   ` Seungwon Jeon
2013-09-26 14:54 ` [PATCH 07/27] mmc: jz4740: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 08/27] mmc: msm_sdcc: " Ulf Hansson
2013-09-26 20:58   ` David Brown
2013-09-26 14:54 ` [PATCH 09/27] mmc: mvsdio: Remove redundant suspend and resume callbacks Ulf Hansson
2013-09-26 15:40   ` Nicolas Pitre
2013-09-27  8:55     ` Ulf Hansson
2013-09-26 14:54 ` [PATCH 10/27] mmc: vub300: " Ulf Hansson
2013-09-27 16:22   ` Alan Stern
2013-09-30  8:24     ` Ulf Hansson
2013-09-26 14:54 ` [PATCH 11/27] mmc: sdhci: Move away from using deprecated APIs Ulf Hansson
2013-09-26 14:54 ` [PATCH 12/27] mmc: tifm_sd: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 13/27] mmc: omap: Remove redundant suspend and resume callbacks Ulf Hansson
2013-09-26 14:54 ` [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs Ulf Hansson
2013-10-10 14:06   ` Balaji T K
2013-09-26 14:54 ` [PATCH 15/27] mmc: mxs-mmc: " Ulf Hansson
2013-09-27  1:30   ` Shawn Guo
2013-09-26 14:54 ` [PATCH 16/27] mmc: mxcmmc: " Ulf Hansson
2013-09-27  7:19   ` Sascha Hauer
2013-09-26 14:54 ` [PATCH 17/27] mmc: wmt-sdmmc: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 18/27] mmc: s3cmci: Remove redundant suspend and resume callbacks Ulf Hansson
2013-09-26 14:54 ` [PATCH 19/27] mmc: pxamci: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 20/27] mmc: wbsd: Move away from using deprecated APIs Ulf Hansson
2013-09-26 14:54 ` [PATCH 21/27] mmc: rtsx: Remove redundant suspend and resume callbacks Ulf Hansson
2013-09-26 14:54 ` [PATCH 22/27] mmc: sdricoh_cs: Move away from using deprecated APIs Ulf Hansson
2013-09-29 17:56   ` Sascha Sommer
2013-09-26 14:54 ` [PATCH 23/27] mmc: sh_mmcif: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 24/27] mmc: tmio: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 25/27] mmc: via-sdmmc: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 26/27] mmc: mmci: " Ulf Hansson
2013-09-26 14:54 ` [PATCH 27/27] mmc: core: Remove deprecated mmc_suspend|resume_host APIs Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380207292-16968-2-git-send-email-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).