All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host
@ 2013-09-26 14:54 Ulf Hansson
  2013-09-26 14:54 ` [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks Ulf Hansson
                   ` (26 more replies)
  0 siblings, 27 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson

This patchset is removing the use of the deprecated APIs from each and every
host driver. The final patch then removes the acutal APIs from mmc core.

I hope to collect acks from each maintainer and then try to merge this through
Chris tree, unless anybody has a better suggestion for the way forward.

Ulf Hansson (27):
  mmc: atmel-mci: Remove redundant suspend and resume callbacks
  mmc: au1xmmc: Move away from using deprecated APIs
  mmc: bfin_sdh: Move away from using deprecated APIs
  mmc: cb710: Move away from using deprecated APIs
  mmc: davinci_mmc: Move away from using deprecated APIs
  mmc: dw_mmc: Move away from using deprecated APIs
  mmc: jz4740: Move away from using deprecated APIs
  mmc: msm_sdcc: Move away from using deprecated APIs
  mmc: mvsdio: Remove redundant suspend and resume callbacks
  mmc: vub300: Remove redundant suspend and resume callbacks
  mmc: sdhci: Move away from using deprecated APIs
  mmc: tifm_sd: Move away from using deprecated APIs
  mmc: omap: Remove redundant suspend and resume callbacks
  mmc: omap_hsmmc: Move away from using deprecated APIs
  mmc: mxs-mmc: Move away from using deprecated APIs
  mmc: mxcmmc: Move away from using deprecated APIs
  mmc: wmt-sdmmc: Move away from using deprecated APIs
  mmc: s3cmci: Remove redundant suspend and resume callbacks
  mmc: pxamci: Remove redundant suspend and resume callbacks
  mmc: wbsd: Move away from using deprecated APIs
  mmc: rtsx: Remove redundant suspend and resume callbacks
  mmc: sdricoh_cs: Move away from using deprecated APIs
  mmc: sh_mmcif: Move away from using deprecated APIs
  mmc: tmio: Move away from using deprecated APIs
  mmc: via-sdmmc: Move away from using deprecated APIs
  mmc: mmci: Move away from using deprecated APIs
  mmc: core: Remove deprecated mmc_suspend|resume_host APIs

 drivers/mmc/core/core.c           |   22 -------------
 drivers/mmc/host/atmel-mci.c      |   61 -------------------------------------
 drivers/mmc/host/au1xmmc.c        |    7 +----
 drivers/mmc/host/bfin_sdh.c       |   12 +-------
 drivers/mmc/host/cb710-mmc.c      |   10 +-----
 drivers/mmc/host/davinci_mmc.c    |   26 +++-------------
 drivers/mmc/host/dw_mmc.c         |   21 -------------
 drivers/mmc/host/jz4740_mmc.c     |    4 ---
 drivers/mmc/host/mmci.c           |   17 +++--------
 drivers/mmc/host/msm_sdcc.c       |   27 ++--------------
 drivers/mmc/host/mvsdio.c         |   29 ------------------
 drivers/mmc/host/mxcmmc.c         |   12 ++------
 drivers/mmc/host/mxs-mmc.c        |   12 ++------
 drivers/mmc/host/omap.c           |   53 --------------------------------
 drivers/mmc/host/omap_hsmmc.c     |   37 ++--------------------
 drivers/mmc/host/pxamci.c         |   32 -------------------
 drivers/mmc/host/rtsx_pci_sdmmc.c |   33 --------------------
 drivers/mmc/host/s3cmci.c         |   29 ------------------
 drivers/mmc/host/sdhci.c          |   20 ++----------
 drivers/mmc/host/sdricoh_cs.c     |    3 --
 drivers/mmc/host/sh_mmcif.c       |   10 ++----
 drivers/mmc/host/tifm_sd.c        |    4 +--
 drivers/mmc/host/tmio_mmc_pio.c   |    9 ++----
 drivers/mmc/host/via-sdmmc.c      |    7 +----
 drivers/mmc/host/vub300.c         |   30 ------------------
 drivers/mmc/host/wbsd.c           |   33 +++-----------------
 drivers/mmc/host/wmt-sdmmc.c      |   27 ++++++----------
 include/linux/mmc/host.h          |    3 --
 28 files changed, 46 insertions(+), 544 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks
  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
  2013-09-26 14:54 ` [PATCH 02/27] mmc: au1xmmc: Move away from using deprecated APIs Ulf Hansson
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Ludovic Desroches

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


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 02/27] mmc: au1xmmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
  2013-09-26 14:54 ` [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 03/27] mmc: bfin_sdh: " Ulf Hansson
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Manuel Lauss

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: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/au1xmmc.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index df9becd..f5443a6 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -1157,11 +1157,6 @@ static int au1xmmc_remove(struct platform_device *pdev)
 static int au1xmmc_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct au1xmmc_host *host = platform_get_drvdata(pdev);
-	int ret;
-
-	ret = mmc_suspend_host(host->mmc);
-	if (ret)
-		return ret;
 
 	au_writel(0, HOST_CONFIG2(host));
 	au_writel(0, HOST_CONFIG(host));
@@ -1178,7 +1173,7 @@ static int au1xmmc_resume(struct platform_device *pdev)
 
 	au1xmmc_reset_controller(host);
 
-	return mmc_resume_host(host->mmc);
+	return 0;
 }
 #else
 #define au1xmmc_suspend NULL
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 03/27] mmc: bfin_sdh: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
  2013-09-26 14:54 ` [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks Ulf Hansson
  2013-09-26 14:54 ` [PATCH 02/27] mmc: au1xmmc: Move away from using deprecated APIs Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-10-08  3:05   ` Sonic Zhang
  2013-09-26 14:54 ` [PATCH 04/27] mmc: cb710: " Ulf Hansson
                   ` (23 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Sonic Zhang, uclinux-dist-devel

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: Sonic Zhang <sonic.zhang@analog.com>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/bfin_sdh.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c
index 94fae2f..bc9110f 100644
--- a/drivers/mmc/host/bfin_sdh.c
+++ b/drivers/mmc/host/bfin_sdh.c
@@ -640,21 +640,15 @@ static int sdh_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int sdh_suspend(struct platform_device *dev, pm_message_t state)
 {
-	struct mmc_host *mmc = platform_get_drvdata(dev);
 	struct bfin_sd_host *drv_data = get_sdh_data(dev);
-	int ret = 0;
-
-	if (mmc)
-		ret = mmc_suspend_host(mmc);
 
 	peripheral_free_list(drv_data->pin_req);
 
-	return ret;
+	return 0;
 }
 
 static int sdh_resume(struct platform_device *dev)
 {
-	struct mmc_host *mmc = platform_get_drvdata(dev);
 	struct bfin_sd_host *drv_data = get_sdh_data(dev);
 	int ret = 0;
 
@@ -665,10 +659,6 @@ static int sdh_resume(struct platform_device *dev)
 	}
 
 	sdh_reset();
-
-	if (mmc)
-		ret = mmc_resume_host(mmc);
-
 	return ret;
 }
 #else
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 04/27] mmc: cb710: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (2 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 03/27] mmc: bfin_sdh: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-27 16:08   ` Michał Mirosław
  2013-09-26 14:54 ` [PATCH 05/27] mmc: davinci_mmc: " Ulf Hansson
                   ` (22 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Michał Mirosław

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: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/cb710-mmc.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/mmc/host/cb710-mmc.c b/drivers/mmc/host/cb710-mmc.c
index 9d6e2b8..1087b4c 100644
--- a/drivers/mmc/host/cb710-mmc.c
+++ b/drivers/mmc/host/cb710-mmc.c
@@ -667,12 +667,6 @@ static const struct mmc_host_ops cb710_mmc_host = {
 static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 {
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
-	struct mmc_host *mmc = cb710_slot_to_mmc(slot);
-	int err;
-
-	err = mmc_suspend_host(mmc);
-	if (err)
-		return err;
 
 	cb710_mmc_enable_irq(slot, 0, ~0);
 	return 0;
@@ -681,11 +675,9 @@ static int cb710_mmc_suspend(struct platform_device *pdev, pm_message_t state)
 static int cb710_mmc_resume(struct platform_device *pdev)
 {
 	struct cb710_slot *slot = cb710_pdev_to_slot(pdev);
-	struct mmc_host *mmc = cb710_slot_to_mmc(slot);
 
 	cb710_mmc_enable_irq(slot, 0, ~0);
-
-	return mmc_resume_host(mmc);
+	return 0;
 }
 
 #endif /* CONFIG_PM */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 05/27] mmc: davinci_mmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (3 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 04/27] mmc: cb710: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 06/27] mmc: dw_mmc: " Ulf Hansson
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Sekhar Nori, Manjunathappa, Prakash,
	davinci-linux-open-source

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 <nsekhar@ti.com>
Cc: Manjunathappa, Prakash <prakash.pm@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 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 = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 06/27] mmc: dw_mmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (4 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 05/27] mmc: davinci_mmc: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-10-23 11:17   ` Seungwon Jeon
  2013-09-26 14:54 ` [PATCH 07/27] mmc: jz4740: " Ulf Hansson
                   ` (20 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Seungwon Jeon, Jaehoon Chung

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: Seungwon Jeon <tgih.jun@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/dw_mmc.c |   21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0a6a512..4bce0de 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2696,23 +2696,6 @@ EXPORT_SYMBOL(dw_mci_remove);
  */
 int dw_mci_suspend(struct dw_mci *host)
 {
-	int i, ret = 0;
-
-	for (i = 0; i < host->num_slots; i++) {
-		struct dw_mci_slot *slot = host->slot[i];
-		if (!slot)
-			continue;
-		ret = mmc_suspend_host(slot->mmc);
-		if (ret < 0) {
-			while (--i >= 0) {
-				slot = host->slot[i];
-				if (slot)
-					mmc_resume_host(host->slot[i]->mmc);
-			}
-			return ret;
-		}
-	}
-
 	if (host->vmmc)
 		regulator_disable(host->vmmc);
 
@@ -2765,10 +2748,6 @@ int dw_mci_resume(struct dw_mci *host)
 			dw_mci_set_ios(slot->mmc, &slot->mmc->ios);
 			dw_mci_setup_bus(slot, true);
 		}
-
-		ret = mmc_resume_host(host->slot[i]->mmc);
-		if (ret < 0)
-			return ret;
 	}
 	return 0;
 }
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 07/27] mmc: jz4740: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (5 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 06/27] mmc: dw_mmc: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 08/27] mmc: msm_sdcc: " Ulf Hansson
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Lars-Peter Clausen

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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/jz4740_mmc.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 6651633..de2139c 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -880,8 +880,6 @@ static int jz4740_mmc_suspend(struct device *dev)
 {
 	struct jz4740_mmc_host *host = dev_get_drvdata(dev);
 
-	mmc_suspend_host(host->mmc);
-
 	jz_gpio_bulk_suspend(jz4740_mmc_pins, jz4740_mmc_num_pins(host));
 
 	return 0;
@@ -893,8 +891,6 @@ static int jz4740_mmc_resume(struct device *dev)
 
 	jz_gpio_bulk_resume(jz4740_mmc_pins, jz4740_mmc_num_pins(host));
 
-	mmc_resume_host(host->mmc);
-
 	return 0;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 08/27] mmc: msm_sdcc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (6 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 07/27] mmc: jz4740: " Ulf Hansson
@ 2013-09-26 14:54 ` 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
                   ` (18 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, David Brown, Daniel Walker, Bryan Huntsman, linux-arm-msm

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.

Additionally, remove dead code which also used the deprecated APIs.

Cc: David Brown <davidb@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/msm_sdcc.c |   27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index b900de4..9405ecd 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -1416,28 +1416,10 @@ ioremap_free:
 }
 
 #ifdef CONFIG_PM
-#ifdef CONFIG_MMC_MSM7X00A_RESUME_IN_WQ
-static void
-do_resume_work(struct work_struct *work)
-{
-	struct msmsdcc_host *host =
-		container_of(work, struct msmsdcc_host, resume_task);
-	struct mmc_host	*mmc = host->mmc;
-
-	if (mmc) {
-		mmc_resume_host(mmc);
-		if (host->stat_irq)
-			enable_irq(host->stat_irq);
-	}
-}
-#endif
-
-
 static int
 msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
 {
 	struct mmc_host *mmc = mmc_get_drvdata(dev);
-	int rc = 0;
 
 	if (mmc) {
 		struct msmsdcc_host *host = mmc_priv(mmc);
@@ -1445,14 +1427,11 @@ msmsdcc_suspend(struct platform_device *dev, pm_message_t state)
 		if (host->stat_irq)
 			disable_irq(host->stat_irq);
 
-		if (mmc->card && mmc->card->type != MMC_TYPE_SDIO)
-			rc = mmc_suspend_host(mmc);
-		if (!rc)
-			msmsdcc_writel(host, 0, MMCIMASK0);
+		msmsdcc_writel(host, 0, MMCIMASK0);
 		if (host->clks_on)
 			msmsdcc_disable_clocks(host, 0);
 	}
-	return rc;
+	return 0;
 }
 
 static int
@@ -1467,8 +1446,6 @@ msmsdcc_resume(struct platform_device *dev)
 
 		msmsdcc_writel(host, host->saved_irq0mask, MMCIMASK0);
 
-		if (mmc->card && mmc->card->type != MMC_TYPE_SDIO)
-			mmc_resume_host(mmc);
 		if (host->stat_irq)
 			enable_irq(host->stat_irq);
 #if BUSCLK_PWRSAVE
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 09/27] mmc: mvsdio: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (7 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 08/27] mmc: msm_sdcc: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 15:40   ` Nicolas Pitre
  2013-09-26 14:54 ` [PATCH 10/27] mmc: vub300: " Ulf Hansson
                   ` (17 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Nicolas Pitre, Thomas Petazzoni, Jason Cooper, Andrew Lunn

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: Nicolas Pitre <nico@fluxnic.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/mvsdio.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index a592407..22ba4d3 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -838,33 +838,6 @@ static int __exit mvsd_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-static int mvsd_suspend(struct platform_device *dev, pm_message_t state)
-{
-	struct mmc_host *mmc = platform_get_drvdata(dev);
-	int ret = 0;
-
-	if (mmc)
-		ret = mmc_suspend_host(mmc);
-
-	return ret;
-}
-
-static int mvsd_resume(struct platform_device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(dev);
-	int ret = 0;
-
-	if (mmc)
-		ret = mmc_resume_host(mmc);
-
-	return ret;
-}
-#else
-#define mvsd_suspend	NULL
-#define mvsd_resume	NULL
-#endif
-
 static const struct of_device_id mvsdio_dt_ids[] = {
 	{ .compatible = "marvell,orion-sdio" },
 	{ /* sentinel */ }
@@ -873,8 +846,6 @@ MODULE_DEVICE_TABLE(of, mvsdio_dt_ids);
 
 static struct platform_driver mvsd_driver = {
 	.remove		= __exit_p(mvsd_remove),
-	.suspend	= mvsd_suspend,
-	.resume		= mvsd_resume,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.of_match_table = mvsdio_dt_ids,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 10/27] mmc: vub300: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (8 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 09/27] mmc: mvsdio: Remove redundant suspend and resume callbacks Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-27 16:22     ` Alan Stern
  2013-09-26 14:54 ` [PATCH 11/27] mmc: sdhci: Move away from using deprecated APIs Ulf Hansson
                   ` (16 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Tony Olech, linux-usb

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: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/vub300.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
index e9028ad..db99edc 100644
--- a/drivers/mmc/host/vub300.c
+++ b/drivers/mmc/host/vub300.c
@@ -2389,34 +2389,6 @@ static void vub300_disconnect(struct usb_interface *interface)
 	}
 }
 
-#ifdef CONFIG_PM
-static int vub300_suspend(struct usb_interface *intf, pm_message_t message)
-{
-	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
-	if (!vub300 || !vub300->mmc) {
-		return 0;
-	} else {
-		struct mmc_host *mmc = vub300->mmc;
-		mmc_suspend_host(mmc);
-		return 0;
-	}
-}
-
-static int vub300_resume(struct usb_interface *intf)
-{
-	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
-	if (!vub300 || !vub300->mmc) {
-		return 0;
-	} else {
-		struct mmc_host *mmc = vub300->mmc;
-		mmc_resume_host(mmc);
-		return 0;
-	}
-}
-#else
-#define vub300_suspend NULL
-#define vub300_resume NULL
-#endif
 static int vub300_pre_reset(struct usb_interface *intf)
 {				/* NOT irq */
 	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
@@ -2437,8 +2409,6 @@ static struct usb_driver vub300_driver = {
 	.name = "vub300",
 	.probe = vub300_probe,
 	.disconnect = vub300_disconnect,
-	.suspend = vub300_suspend,
-	.resume = vub300_resume,
 	.pre_reset = vub300_pre_reset,
 	.post_reset = vub300_post_reset,
 	.id_table = vub300_table,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 11/27] mmc: sdhci: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (9 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 10/27] mmc: vub300: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 12/27] mmc: tifm_sd: " Ulf Hansson
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson

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.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdhci.c |   20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 7a7fb4f..bdb7598 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2546,8 +2546,6 @@ EXPORT_SYMBOL_GPL(sdhci_disable_irq_wakeups);
 
 int sdhci_suspend_host(struct sdhci_host *host)
 {
-	int ret;
-
 	if (host->ops->platform_suspend)
 		host->ops->platform_suspend(host);
 
@@ -2559,19 +2557,6 @@ int sdhci_suspend_host(struct sdhci_host *host)
 		host->flags &= ~SDHCI_NEEDS_RETUNING;
 	}
 
-	ret = mmc_suspend_host(host->mmc);
-	if (ret) {
-		if (host->flags & SDHCI_USING_RETUNING_TIMER) {
-			host->flags |= SDHCI_NEEDS_RETUNING;
-			mod_timer(&host->tuning_timer, jiffies +
-					host->tuning_count * HZ);
-		}
-
-		sdhci_enable_card_detection(host);
-
-		return ret;
-	}
-
 	if (!device_may_wakeup(mmc_dev(host->mmc))) {
 		sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK);
 		free_irq(host->irq, host);
@@ -2579,14 +2564,14 @@ int sdhci_suspend_host(struct sdhci_host *host)
 		sdhci_enable_irq_wakeups(host);
 		enable_irq_wake(host->irq);
 	}
-	return ret;
+	return 0;
 }
 
 EXPORT_SYMBOL_GPL(sdhci_suspend_host);
 
 int sdhci_resume_host(struct sdhci_host *host)
 {
-	int ret;
+	int ret = 0;
 
 	if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) {
 		if (host->ops->enable_dma)
@@ -2615,7 +2600,6 @@ int sdhci_resume_host(struct sdhci_host *host)
 		mmiowb();
 	}
 
-	ret = mmc_resume_host(host->mmc);
 	sdhci_enable_card_detection(host);
 
 	if (host->ops->platform_resume)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 12/27] mmc: tifm_sd: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (10 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 11/27] mmc: sdhci: Move away from using deprecated APIs Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 13/27] mmc: omap: Remove redundant suspend and resume callbacks Ulf Hansson
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Alex Dubov

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: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/tifm_sd.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c
index 43d9628..d1760eb 100644
--- a/drivers/mmc/host/tifm_sd.c
+++ b/drivers/mmc/host/tifm_sd.c
@@ -1030,7 +1030,7 @@ static void tifm_sd_remove(struct tifm_dev *sock)
 
 static int tifm_sd_suspend(struct tifm_dev *sock, pm_message_t state)
 {
-	return mmc_suspend_host(tifm_get_drvdata(sock));
+	return 0;
 }
 
 static int tifm_sd_resume(struct tifm_dev *sock)
@@ -1044,8 +1044,6 @@ static int tifm_sd_resume(struct tifm_dev *sock)
 
 	if (rc)
 		host->eject = 1;
-	else
-		rc = mmc_resume_host(mmc);
 
 	return rc;
 }
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 13/27] mmc: omap: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (11 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 12/27] mmc: tifm_sd: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs Ulf Hansson
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Jarkko Lavinen, linux-omap

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: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/omap.c |   53 -----------------------------------------------
 1 file changed, 53 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b94f38e..0b10a90 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -128,7 +128,6 @@ struct mmc_omap_slot {
 
 struct mmc_omap_host {
 	int			initialized;
-	int			suspended;
 	struct mmc_request *	mrq;
 	struct mmc_command *	cmd;
 	struct mmc_data *	data;
@@ -1513,61 +1512,9 @@ static int mmc_omap_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-static int mmc_omap_suspend(struct platform_device *pdev, pm_message_t mesg)
-{
-	int i, ret = 0;
-	struct mmc_omap_host *host = platform_get_drvdata(pdev);
-
-	if (host == NULL || host->suspended)
-		return 0;
-
-	for (i = 0; i < host->nr_slots; i++) {
-		struct mmc_omap_slot *slot;
-
-		slot = host->slots[i];
-		ret = mmc_suspend_host(slot->mmc);
-		if (ret < 0) {
-			while (--i >= 0) {
-				slot = host->slots[i];
-				mmc_resume_host(slot->mmc);
-			}
-			return ret;
-		}
-	}
-	host->suspended = 1;
-	return 0;
-}
-
-static int mmc_omap_resume(struct platform_device *pdev)
-{
-	int i, ret = 0;
-	struct mmc_omap_host *host = platform_get_drvdata(pdev);
-
-	if (host == NULL || !host->suspended)
-		return 0;
-
-	for (i = 0; i < host->nr_slots; i++) {
-		struct mmc_omap_slot *slot;
-		slot = host->slots[i];
-		ret = mmc_resume_host(slot->mmc);
-		if (ret < 0)
-			return ret;
-
-		host->suspended = 0;
-	}
-	return 0;
-}
-#else
-#define mmc_omap_suspend	NULL
-#define mmc_omap_resume		NULL
-#endif
-
 static struct platform_driver mmc_omap_driver = {
 	.probe		= mmc_omap_probe,
 	.remove		= mmc_omap_remove,
-	.suspend	= mmc_omap_suspend,
-	.resume		= mmc_omap_resume,
 	.driver		= {
 		.name	= DRIVER_NAME,
 		.owner	= THIS_MODULE,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (12 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 13/27] mmc: omap: Remove redundant suspend and resume callbacks Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-10-10 14:06     ` Balaji T K
  2013-09-26 14:54 ` [PATCH 15/27] mmc: mxs-mmc: " Ulf Hansson
                   ` (12 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Balaji T K, linux-omap

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. Additional cleanup done for keeping track
suspended state.

Cc: Balaji T K <balajitk@ti.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/omap_hsmmc.c |   37 +++----------------------------------
 1 file changed, 3 insertions(+), 34 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 6ac63df..eb6fb28 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -170,7 +170,6 @@ struct omap_hsmmc_host {
 	unsigned int		dma_sg_idx;
 	unsigned char		bus_mode;
 	unsigned char		power_mode;
-	int			suspended;
 	int			irq;
 	int			use_dma, dma_ch;
 	struct dma_chan		*tx_chan;
@@ -1178,9 +1177,6 @@ static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
 	struct omap_mmc_slot_data *slot = &mmc_slot(host);
 	int carddetect;
 
-	if (host->suspended)
-		return IRQ_HANDLED;
-
 	sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
 
 	if (slot->card_detect)
@@ -1643,11 +1639,6 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
 	seq_printf(s, "mmc%d:\n ctx_loss:\t%d:%d\n\nregs:\n",
 			mmc->index, host->context_loss, context_loss);
 
-	if (host->suspended) {
-		seq_printf(s, "host suspended, can't read registers\n");
-		return 0;
-	}
-
 	pm_runtime_get_sync(host->dev);
 
 	seq_printf(s, "CON:\t\t0x%08x\n",
@@ -2119,23 +2110,12 @@ static void omap_hsmmc_complete(struct device *dev)
 
 static int omap_hsmmc_suspend(struct device *dev)
 {
-	int ret = 0;
 	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
 
 	if (!host)
 		return 0;
 
-	if (host && host->suspended)
-		return 0;
-
 	pm_runtime_get_sync(host->dev);
-	host->suspended = 1;
-	ret = mmc_suspend_host(host->mmc);
-
-	if (ret) {
-		host->suspended = 0;
-		goto err;
-	}
 
 	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
 		omap_hsmmc_disable_irq(host);
@@ -2145,23 +2125,19 @@ static int omap_hsmmc_suspend(struct device *dev)
 
 	if (host->dbclk)
 		clk_disable_unprepare(host->dbclk);
-err:
+
 	pm_runtime_put_sync(host->dev);
-	return ret;
+	return 0;
 }
 
 /* Routine to resume the MMC device */
 static int omap_hsmmc_resume(struct device *dev)
 {
-	int ret = 0;
 	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
 
 	if (!host)
 		return 0;
 
-	if (host && !host->suspended)
-		return 0;
-
 	pm_runtime_get_sync(host->dev);
 
 	if (host->dbclk)
@@ -2172,16 +2148,9 @@ static int omap_hsmmc_resume(struct device *dev)
 
 	omap_hsmmc_protect_card(host);
 
-	/* Notify the core to resume the host */
-	ret = mmc_resume_host(host->mmc);
-	if (ret == 0)
-		host->suspended = 0;
-
 	pm_runtime_mark_last_busy(host->dev);
 	pm_runtime_put_autosuspend(host->dev);
-
-	return ret;
-
+	return 0;
 }
 
 #else
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 15/27] mmc: mxs-mmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (13 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-27  1:30     ` Shawn Guo
  2013-09-26 14:54 ` [PATCH 16/27] mmc: mxcmmc: " Ulf Hansson
                   ` (11 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Shawn Guo, Fabio Estevam

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: Shawn Guo <shawn.guo@linaro.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/mxs-mmc.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index e1fa3ef..50fc9df 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -724,13 +724,9 @@ static int mxs_mmc_suspend(struct device *dev)
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxs_mmc_host *host = mmc_priv(mmc);
 	struct mxs_ssp *ssp = &host->ssp;
-	int ret = 0;
-
-	ret = mmc_suspend_host(mmc);
 
 	clk_disable_unprepare(ssp->clk);
-
-	return ret;
+	return 0;
 }
 
 static int mxs_mmc_resume(struct device *dev)
@@ -738,13 +734,9 @@ static int mxs_mmc_resume(struct device *dev)
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxs_mmc_host *host = mmc_priv(mmc);
 	struct mxs_ssp *ssp = &host->ssp;
-	int ret = 0;
 
 	clk_prepare_enable(ssp->clk);
-
-	ret = mmc_resume_host(mmc);
-
-	return ret;
+	return 0;
 }
 
 static const struct dev_pm_ops mxs_mmc_pm_ops = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 16/27] mmc: mxcmmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (14 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 15/27] mmc: mxs-mmc: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-27  7:19   ` Sascha Hauer
  2013-09-26 14:54   ` Ulf Hansson
                   ` (10 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Sascha Hauer, Anatolij Gustschin

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: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/mxcmmc.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index c174c6a..f7199c8 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -1250,28 +1250,20 @@ static int mxcmci_suspend(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxcmci_host *host = mmc_priv(mmc);
-	int ret = 0;
 
-	if (mmc)
-		ret = mmc_suspend_host(mmc);
 	clk_disable_unprepare(host->clk_per);
 	clk_disable_unprepare(host->clk_ipg);
-
-	return ret;
+	return 0;
 }
 
 static int mxcmci_resume(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxcmci_host *host = mmc_priv(mmc);
-	int ret = 0;
 
 	clk_prepare_enable(host->clk_per);
 	clk_prepare_enable(host->clk_ipg);
-	if (mmc)
-		ret = mmc_resume_host(mmc);
-
-	return ret;
+	return 0;
 }
 
 static const struct dev_pm_ops mxcmci_pm_ops = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 17/27] mmc: wmt-sdmmc: Move away from using deprecated APIs
  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
  2013-09-26 14:54 ` [PATCH 02/27] mmc: au1xmmc: Move away from using deprecated APIs Ulf Hansson
                     ` (25 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Tony Prisk, linux-arm-kernel

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: Tony Prisk <linux@prisktech.co.nz>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/wmt-sdmmc.c |   27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 34231d5..be94470 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -939,28 +939,23 @@ static int wmt_mci_suspend(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct wmt_mci_priv *priv;
-	int ret;
 
 	if (!mmc)
 		return 0;
 
 	priv = mmc_priv(mmc);
-	ret = mmc_suspend_host(mmc);
-
-	if (!ret) {
-		reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE);
-		writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base +
-		       SDMMC_BUSMODE);
+	reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE);
+	writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base +
+	       SDMMC_BUSMODE);
 
-		reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN);
-		writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN);
+	reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN);
+	writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN);
 
-		writeb(0xFF, priv->sdmmc_base + SDMMC_STS0);
-		writeb(0xFF, priv->sdmmc_base + SDMMC_STS1);
+	writeb(0xFF, priv->sdmmc_base + SDMMC_STS0);
+	writeb(0xFF, priv->sdmmc_base + SDMMC_STS1);
 
-		clk_disable(priv->clk_sdmmc);
-	}
-	return ret;
+	clk_disable(priv->clk_sdmmc);
+	return 0;
 }
 
 static int wmt_mci_resume(struct device *dev)
@@ -969,7 +964,6 @@ static int wmt_mci_resume(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct wmt_mci_priv *priv;
-	int ret = 0;
 
 	if (mmc) {
 		priv = mmc_priv(mmc);
@@ -987,10 +981,9 @@ static int wmt_mci_resume(struct device *dev)
 		writeb(reg_tmp | INT0_DI_INT_EN, priv->sdmmc_base +
 		       SDMMC_INTMASK0);
 
-		ret = mmc_resume_host(mmc);
 	}
 
-	return ret;
+	return 0;
 }
 
 static const struct dev_pm_ops wmt_mci_pm = {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 17/27] mmc: wmt-sdmmc: Move away from using deprecated APIs
@ 2013-09-26 14:54   ` Ulf Hansson
  0 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

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: Tony Prisk <linux@prisktech.co.nz>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/wmt-sdmmc.c |   27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
index 34231d5..be94470 100644
--- a/drivers/mmc/host/wmt-sdmmc.c
+++ b/drivers/mmc/host/wmt-sdmmc.c
@@ -939,28 +939,23 @@ static int wmt_mci_suspend(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct wmt_mci_priv *priv;
-	int ret;
 
 	if (!mmc)
 		return 0;
 
 	priv = mmc_priv(mmc);
-	ret = mmc_suspend_host(mmc);
-
-	if (!ret) {
-		reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE);
-		writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base +
-		       SDMMC_BUSMODE);
+	reg_tmp = readb(priv->sdmmc_base + SDMMC_BUSMODE);
+	writeb(reg_tmp | BM_SOFT_RESET, priv->sdmmc_base +
+	       SDMMC_BUSMODE);
 
-		reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN);
-		writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN);
+	reg_tmp = readw(priv->sdmmc_base + SDMMC_BLKLEN);
+	writew(reg_tmp & 0x5FFF, priv->sdmmc_base + SDMMC_BLKLEN);
 
-		writeb(0xFF, priv->sdmmc_base + SDMMC_STS0);
-		writeb(0xFF, priv->sdmmc_base + SDMMC_STS1);
+	writeb(0xFF, priv->sdmmc_base + SDMMC_STS0);
+	writeb(0xFF, priv->sdmmc_base + SDMMC_STS1);
 
-		clk_disable(priv->clk_sdmmc);
-	}
-	return ret;
+	clk_disable(priv->clk_sdmmc);
+	return 0;
 }
 
 static int wmt_mci_resume(struct device *dev)
@@ -969,7 +964,6 @@ static int wmt_mci_resume(struct device *dev)
 	struct platform_device *pdev = to_platform_device(dev);
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct wmt_mci_priv *priv;
-	int ret = 0;
 
 	if (mmc) {
 		priv = mmc_priv(mmc);
@@ -987,10 +981,9 @@ static int wmt_mci_resume(struct device *dev)
 		writeb(reg_tmp | INT0_DI_INT_EN, priv->sdmmc_base +
 		       SDMMC_INTMASK0);
 
-		ret = mmc_resume_host(mmc);
 	}
 
-	return ret;
+	return 0;
 }
 
 static const struct dev_pm_ops wmt_mci_pm = {
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 18/27] mmc: s3cmci: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
  2013-09-26 14:54 ` [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks Ulf Hansson
@ 2013-09-26 14:54   ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 03/27] mmc: bfin_sdh: " Ulf Hansson
                     ` (24 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Ben Dooks, linux-arm-kernel

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: Ben Dooks <ben-linux@fluff.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/s3cmci.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8d6794c..2fce5ea 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1949,39 +1949,10 @@ static struct platform_device_id s3cmci_driver_ids[] = {
 
 MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
 
-
-#ifdef CONFIG_PM
-
-static int s3cmci_suspend(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_suspend_host(mmc);
-}
-
-static int s3cmci_resume(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_resume_host(mmc);
-}
-
-static const struct dev_pm_ops s3cmci_pm = {
-	.suspend	= s3cmci_suspend,
-	.resume		= s3cmci_resume,
-};
-
-#define s3cmci_pm_ops &s3cmci_pm
-#else /* CONFIG_PM */
-#define s3cmci_pm_ops NULL
-#endif /* CONFIG_PM */
-
-
 static struct platform_driver s3cmci_driver = {
 	.driver	= {
 		.name	= "s3c-sdi",
 		.owner	= THIS_MODULE,
-		.pm	= s3cmci_pm_ops,
 	},
 	.id_table	= s3cmci_driver_ids,
 	.probe		= s3cmci_probe,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 18/27] mmc: s3cmci: Remove redundant suspend and resume callbacks
@ 2013-09-26 14:54   ` Ulf Hansson
  0 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, linux-arm-kernel, Ben Dooks

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: Ben Dooks <ben-linux@fluff.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/s3cmci.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8d6794c..2fce5ea 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1949,39 +1949,10 @@ static struct platform_device_id s3cmci_driver_ids[] = {
 
 MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
 
-
-#ifdef CONFIG_PM
-
-static int s3cmci_suspend(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_suspend_host(mmc);
-}
-
-static int s3cmci_resume(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_resume_host(mmc);
-}
-
-static const struct dev_pm_ops s3cmci_pm = {
-	.suspend	= s3cmci_suspend,
-	.resume		= s3cmci_resume,
-};
-
-#define s3cmci_pm_ops &s3cmci_pm
-#else /* CONFIG_PM */
-#define s3cmci_pm_ops NULL
-#endif /* CONFIG_PM */
-
-
 static struct platform_driver s3cmci_driver = {
 	.driver	= {
 		.name	= "s3c-sdi",
 		.owner	= THIS_MODULE,
-		.pm	= s3cmci_pm_ops,
 	},
 	.id_table	= s3cmci_driver_ids,
 	.probe		= s3cmci_probe,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 18/27] mmc: s3cmci: Remove redundant suspend and resume callbacks
@ 2013-09-26 14:54   ` Ulf Hansson
  0 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-arm-kernel

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: Ben Dooks <ben-linux@fluff.org>
Cc: linux-arm-kernel at lists.infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/s3cmci.c |   29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 8d6794c..2fce5ea 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1949,39 +1949,10 @@ static struct platform_device_id s3cmci_driver_ids[] = {
 
 MODULE_DEVICE_TABLE(platform, s3cmci_driver_ids);
 
-
-#ifdef CONFIG_PM
-
-static int s3cmci_suspend(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_suspend_host(mmc);
-}
-
-static int s3cmci_resume(struct device *dev)
-{
-	struct mmc_host *mmc = platform_get_drvdata(to_platform_device(dev));
-
-	return mmc_resume_host(mmc);
-}
-
-static const struct dev_pm_ops s3cmci_pm = {
-	.suspend	= s3cmci_suspend,
-	.resume		= s3cmci_resume,
-};
-
-#define s3cmci_pm_ops &s3cmci_pm
-#else /* CONFIG_PM */
-#define s3cmci_pm_ops NULL
-#endif /* CONFIG_PM */
-
-
 static struct platform_driver s3cmci_driver = {
 	.driver	= {
 		.name	= "s3c-sdi",
 		.owner	= THIS_MODULE,
-		.pm	= s3cmci_pm_ops,
 	},
 	.id_table	= s3cmci_driver_ids,
 	.probe		= s3cmci_probe,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 19/27] mmc: pxamci: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (17 preceding siblings ...)
  2013-09-26 14:54   ` Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 20/27] mmc: wbsd: Move away from using deprecated APIs Ulf Hansson
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson

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.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/pxamci.c |   32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 1956a3d..32fe113 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -880,35 +880,6 @@ static int pxamci_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-static int pxamci_suspend(struct device *dev)
-{
-	struct mmc_host *mmc = dev_get_drvdata(dev);
-	int ret = 0;
-
-	if (mmc)
-		ret = mmc_suspend_host(mmc);
-
-	return ret;
-}
-
-static int pxamci_resume(struct device *dev)
-{
-	struct mmc_host *mmc = dev_get_drvdata(dev);
-	int ret = 0;
-
-	if (mmc)
-		ret = mmc_resume_host(mmc);
-
-	return ret;
-}
-
-static const struct dev_pm_ops pxamci_pm_ops = {
-	.suspend	= pxamci_suspend,
-	.resume		= pxamci_resume,
-};
-#endif
-
 static struct platform_driver pxamci_driver = {
 	.probe		= pxamci_probe,
 	.remove		= pxamci_remove,
@@ -916,9 +887,6 @@ static struct platform_driver pxamci_driver = {
 		.name	= DRIVER_NAME,
 		.owner	= THIS_MODULE,
 		.of_match_table = of_match_ptr(pxa_mmc_dt_ids),
-#ifdef CONFIG_PM
-		.pm	= &pxamci_pm_ops,
-#endif
 	},
 };
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 20/27] mmc: wbsd: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (18 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 19/27] mmc: pxamci: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 21/27] mmc: rtsx: Remove redundant suspend and resume callbacks Ulf Hansson
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Pierre Ossman

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: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/wbsd.c |   33 +++++----------------------------
 1 file changed, 5 insertions(+), 28 deletions(-)

diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index e954b77..024c824 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -1814,28 +1814,11 @@ static void wbsd_pnp_remove(struct pnp_dev *dev)
 
 #ifdef CONFIG_PM
 
-static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
-{
-	BUG_ON(host == NULL);
-
-	return mmc_suspend_host(host->mmc);
-}
-
-static int wbsd_resume(struct wbsd_host *host)
-{
-	BUG_ON(host == NULL);
-
-	wbsd_init_device(host);
-
-	return mmc_resume_host(host->mmc);
-}
-
 static int wbsd_platform_suspend(struct platform_device *dev,
 				 pm_message_t state)
 {
 	struct mmc_host *mmc = platform_get_drvdata(dev);
 	struct wbsd_host *host;
-	int ret;
 
 	if (mmc == NULL)
 		return 0;
@@ -1844,12 +1827,7 @@ static int wbsd_platform_suspend(struct platform_device *dev,
 
 	host = mmc_priv(mmc);
 
-	ret = wbsd_suspend(host, state);
-	if (ret)
-		return ret;
-
 	wbsd_chip_poweroff(host);
-
 	return 0;
 }
 
@@ -1872,7 +1850,8 @@ static int wbsd_platform_resume(struct platform_device *dev)
 	 */
 	mdelay(5);
 
-	return wbsd_resume(host);
+	wbsd_init_device(host);
+	return 0;
 }
 
 #ifdef CONFIG_PNP
@@ -1886,10 +1865,7 @@ static int wbsd_pnp_suspend(struct pnp_dev *pnp_dev, pm_message_t state)
 		return 0;
 
 	DBGF("Suspending...\n");
-
-	host = mmc_priv(mmc);
-
-	return wbsd_suspend(host, state);
+	return 0;
 }
 
 static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
@@ -1922,7 +1898,8 @@ static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
 	 */
 	mdelay(5);
 
-	return wbsd_resume(host);
+	wbsd_init_device(host);
+	return 0;
 }
 
 #endif /* CONFIG_PNP */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 21/27] mmc: rtsx: Remove redundant suspend and resume callbacks
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (19 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 20/27] mmc: wbsd: Move away from using deprecated APIs Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 22/27] mmc: sdricoh_cs: Move away from using deprecated APIs Ulf Hansson
                   ` (5 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Wei WANG, Samuel Ortiz

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: Wei WANG <wei_wang@realsil.com.cn>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/rtsx_pci_sdmmc.c |   33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c
index e2ab124..c46feda 100644
--- a/drivers/mmc/host/rtsx_pci_sdmmc.c
+++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
@@ -1197,37 +1197,6 @@ static const struct mmc_host_ops realtek_pci_sdmmc_ops = {
 	.execute_tuning = sdmmc_execute_tuning,
 };
 
-#ifdef CONFIG_PM
-static int rtsx_pci_sdmmc_suspend(struct platform_device *pdev,
-		pm_message_t state)
-{
-	struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
-	struct mmc_host *mmc = host->mmc;
-	int err;
-
-	dev_dbg(sdmmc_dev(host), "--> %s\n", __func__);
-
-	err = mmc_suspend_host(mmc);
-	if (err)
-		return err;
-
-	return 0;
-}
-
-static int rtsx_pci_sdmmc_resume(struct platform_device *pdev)
-{
-	struct realtek_pci_sdmmc *host = platform_get_drvdata(pdev);
-	struct mmc_host *mmc = host->mmc;
-
-	dev_dbg(sdmmc_dev(host), "--> %s\n", __func__);
-
-	return mmc_resume_host(mmc);
-}
-#else /* CONFIG_PM */
-#define rtsx_pci_sdmmc_suspend NULL
-#define rtsx_pci_sdmmc_resume NULL
-#endif /* CONFIG_PM */
-
 static void init_extra_caps(struct realtek_pci_sdmmc *host)
 {
 	struct mmc_host *mmc = host->mmc;
@@ -1367,8 +1336,6 @@ static struct platform_driver rtsx_pci_sdmmc_driver = {
 	.probe		= rtsx_pci_sdmmc_drv_probe,
 	.remove		= rtsx_pci_sdmmc_drv_remove,
 	.id_table       = rtsx_pci_sdmmc_ids,
-	.suspend	= rtsx_pci_sdmmc_suspend,
-	.resume		= rtsx_pci_sdmmc_resume,
 	.driver		= {
 		.owner	= THIS_MODULE,
 		.name	= DRV_NAME_RTSX_PCI_SDMMC,
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 22/27] mmc: sdricoh_cs: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (20 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 21/27] mmc: rtsx: Remove redundant suspend and resume callbacks Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-29 17:56   ` Sascha Sommer
  2013-09-26 14:54 ` [PATCH 23/27] mmc: sh_mmcif: " Ulf Hansson
                   ` (4 subsequent siblings)
  26 siblings, 1 reply; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Sascha Sommer

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: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sdricoh_cs.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 50adbd1..b7e3057 100644
--- a/drivers/mmc/host/sdricoh_cs.c
+++ b/drivers/mmc/host/sdricoh_cs.c
@@ -516,9 +516,7 @@ static void sdricoh_pcmcia_detach(struct pcmcia_device *link)
 #ifdef CONFIG_PM
 static int sdricoh_pcmcia_suspend(struct pcmcia_device *link)
 {
-	struct mmc_host *mmc = link->priv;
 	dev_dbg(&link->dev, "suspend\n");
-	mmc_suspend_host(mmc);
 	return 0;
 }
 
@@ -527,7 +525,6 @@ static int sdricoh_pcmcia_resume(struct pcmcia_device *link)
 	struct mmc_host *mmc = link->priv;
 	dev_dbg(&link->dev, "resume\n");
 	sdricoh_reset(mmc_priv(mmc));
-	mmc_resume_host(mmc);
 	return 0;
 }
 #else
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 23/27] mmc: sh_mmcif: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (21 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 22/27] mmc: sdricoh_cs: Move away from using deprecated APIs Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 24/27] mmc: tmio: " Ulf Hansson
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Guennadi Liakhovetski

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: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/sh_mmcif.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 36629a0..6bffebe 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1542,19 +1542,15 @@ static int sh_mmcif_remove(struct platform_device *pdev)
 static int sh_mmcif_suspend(struct device *dev)
 {
 	struct sh_mmcif_host *host = dev_get_drvdata(dev);
-	int ret = mmc_suspend_host(host->mmc);
 
-	if (!ret)
-		sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);
+	sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);
 
-	return ret;
+	return 0;
 }
 
 static int sh_mmcif_resume(struct device *dev)
 {
-	struct sh_mmcif_host *host = dev_get_drvdata(dev);
-
-	return mmc_resume_host(host->mmc);
+	return 0;
 }
 #else
 #define sh_mmcif_suspend	NULL
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 24/27] mmc: tmio: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (22 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 23/27] mmc: sh_mmcif: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 25/27] mmc: via-sdmmc: " Ulf Hansson
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Guennadi Liakhovetski, Ian Molton

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: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/tmio_mmc_pio.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index b380225..f3b2d8c 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -1145,12 +1145,9 @@ int tmio_mmc_host_suspend(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct tmio_mmc_host *host = mmc_priv(mmc);
-	int ret = mmc_suspend_host(mmc);
 
-	if (!ret)
-		tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
-
-	return ret;
+	tmio_mmc_disable_mmc_irqs(host, TMIO_MASK_ALL);
+	return 0;
 }
 EXPORT_SYMBOL(tmio_mmc_host_suspend);
 
@@ -1163,7 +1160,7 @@ int tmio_mmc_host_resume(struct device *dev)
 
 	/* The MMC core will perform the complete set up */
 	host->resuming = true;
-	return mmc_resume_host(mmc);
+	return 0;
 }
 EXPORT_SYMBOL(tmio_mmc_host_resume);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 25/27] mmc: via-sdmmc: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (23 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 24/27] mmc: tmio: " Ulf Hansson
@ 2013-09-26 14:54 ` 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
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball
  Cc: Ulf Hansson, Bruce Chang, Harald Welte

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: Bruce Chang <brucechang@via.com.tw>
Cc: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/via-sdmmc.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c
index 4f84586..63fac78 100644
--- a/drivers/mmc/host/via-sdmmc.c
+++ b/drivers/mmc/host/via-sdmmc.c
@@ -1269,21 +1269,18 @@ static void via_init_sdc_pm(struct via_crdr_mmc_host *host)
 static int via_sd_suspend(struct pci_dev *pcidev, pm_message_t state)
 {
 	struct via_crdr_mmc_host *host;
-	int ret = 0;
 
 	host = pci_get_drvdata(pcidev);
 
 	via_save_pcictrlreg(host);
 	via_save_sdcreg(host);
 
-	ret = mmc_suspend_host(host->mmc);
-
 	pci_save_state(pcidev);
 	pci_enable_wake(pcidev, pci_choose_state(pcidev, state), 0);
 	pci_disable_device(pcidev);
 	pci_set_power_state(pcidev, pci_choose_state(pcidev, state));
 
-	return ret;
+	return 0;
 }
 
 static int via_sd_resume(struct pci_dev *pcidev)
@@ -1316,8 +1313,6 @@ static int via_sd_resume(struct pci_dev *pcidev)
 	via_restore_pcictrlreg(sdhost);
 	via_init_sdc_pm(sdhost);
 
-	ret = mmc_resume_host(sdhost->mmc);
-
 	return ret;
 }
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 26/27] mmc: mmci: Move away from using deprecated APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (24 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 25/27] mmc: via-sdmmc: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  2013-09-26 14:54 ` [PATCH 27/27] mmc: core: Remove deprecated mmc_suspend|resume_host APIs Ulf Hansson
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson, Russell King

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: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/mmci.c |   17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index c3785ed..9e8a482 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1725,37 +1725,28 @@ static int mmci_suspend(struct device *dev)
 {
 	struct amba_device *adev = to_amba_device(dev);
 	struct mmc_host *mmc = amba_get_drvdata(adev);
-	int ret = 0;
 
 	if (mmc) {
 		struct mmci_host *host = mmc_priv(mmc);
-
-		ret = mmc_suspend_host(mmc);
-		if (ret == 0) {
-			pm_runtime_get_sync(dev);
-			writel(0, host->base + MMCIMASK0);
-		}
+		pm_runtime_get_sync(dev);
+		writel(0, host->base + MMCIMASK0);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int mmci_resume(struct device *dev)
 {
 	struct amba_device *adev = to_amba_device(dev);
 	struct mmc_host *mmc = amba_get_drvdata(adev);
-	int ret = 0;
 
 	if (mmc) {
 		struct mmci_host *host = mmc_priv(mmc);
-
 		writel(MCI_IRQENABLE, host->base + MMCIMASK0);
 		pm_runtime_put(dev);
-
-		ret = mmc_resume_host(mmc);
 	}
 
-	return ret;
+	return 0;
 }
 #endif
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [PATCH 27/27] mmc: core: Remove deprecated mmc_suspend|resume_host APIs
  2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
                   ` (25 preceding siblings ...)
  2013-09-26 14:54 ` [PATCH 26/27] mmc: mmci: " Ulf Hansson
@ 2013-09-26 14:54 ` Ulf Hansson
  26 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-26 14:54 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Chris Ball; +Cc: Ulf Hansson

The are no more users of the deprecated mmc_suspend|resume_host API,
so let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/core.c  |   22 ----------------------
 include/linux/mmc/host.h |    3 ---
 2 files changed, 25 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 006ead2..be24b87 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2632,28 +2632,6 @@ EXPORT_SYMBOL(mmc_cache_ctrl);
 
 #ifdef CONFIG_PM
 
-/**
- *	mmc_suspend_host - suspend a host
- *	@host: mmc host
- */
-int mmc_suspend_host(struct mmc_host *host)
-{
-	/* This function is deprecated */
-	return 0;
-}
-EXPORT_SYMBOL(mmc_suspend_host);
-
-/**
- *	mmc_resume_host - resume a previously suspended host
- *	@host: mmc host
- */
-int mmc_resume_host(struct mmc_host *host)
-{
-	/* This function is deprecated */
-	return 0;
-}
-EXPORT_SYMBOL(mmc_resume_host);
-
 /* Do the card removal on suspend if card is assumed removeable
  * Do that in pm notifier while userspace isn't yet frozen, so we will be able
    to sync the card.
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 3b0c33a..a579d3a 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -382,9 +382,6 @@ static inline void *mmc_priv(struct mmc_host *host)
 #define mmc_classdev(x)	(&(x)->class_dev)
 #define mmc_hostname(x)	(dev_name(&(x)->class_dev))
 
-int mmc_suspend_host(struct mmc_host *);
-int mmc_resume_host(struct mmc_host *);
-
 int mmc_power_save_host(struct mmc_host *host);
 int mmc_power_restore_host(struct mmc_host *host);
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH 09/27] mmc: mvsdio: Remove redundant suspend and resume callbacks
  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
  0 siblings, 1 reply; 46+ messages in thread
From: Nicolas Pitre @ 2013-09-26 15:40 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-kernel, linux-mmc, Chris Ball, Thomas Petazzoni,
	Jason Cooper, Andrew Lunn

On Thu, 26 Sep 2013, Ulf Hansson wrote:

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

Having the protocol layer take care of card suspend is perfectly sound.

However, what about host controllers?  Shouldn't they suspend themselves 
as well?  There is certainly potential for power saving by gating clocks 
to the host IP block or the like.


Nicolas

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 08/27] mmc: msm_sdcc: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 08/27] mmc: msm_sdcc: " Ulf Hansson
@ 2013-09-26 20:58   ` David Brown
  0 siblings, 0 replies; 46+ messages in thread
From: David Brown @ 2013-09-26 20:58 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-kernel, linux-mmc, Chris Ball, Daniel Walker,
	Bryan Huntsman, linux-arm-msm

On Thu, Sep 26, 2013 at 04:54:33PM +0200, Ulf Hansson wrote:
>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.
>
>Additionally, remove dead code which also used the deprecated APIs.
>
>Cc: David Brown <davidb@codeaurora.org>
>Cc: Daniel Walker <dwalker@fifo99.com>
>Cc: Bryan Huntsman <bryanh@codeaurora.org>
>Cc: linux-arm-msm@vger.kernel.org
>Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>---
> drivers/mmc/host/msm_sdcc.c |   27 ++-------------------------
> 1 file changed, 2 insertions(+), 25 deletions(-)

Acked-by: David Brown <davidb@codeaurora.org>

-- 
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 15/27] mmc: mxs-mmc: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 15/27] mmc: mxs-mmc: " Ulf Hansson
@ 2013-09-27  1:30     ` Shawn Guo
  0 siblings, 0 replies; 46+ messages in thread
From: Shawn Guo @ 2013-09-27  1:30 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, Fabio Estevam

On Thu, Sep 26, 2013 at 04:54:40PM +0200, Ulf Hansson wrote:
> 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: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Shawn Guo <shawn.guo@linaro.org>


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 15/27] mmc: mxs-mmc: Move away from using deprecated APIs
@ 2013-09-27  1:30     ` Shawn Guo
  0 siblings, 0 replies; 46+ messages in thread
From: Shawn Guo @ 2013-09-27  1:30 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, Fabio Estevam

On Thu, Sep 26, 2013 at 04:54:40PM +0200, Ulf Hansson wrote:
> 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: Shawn Guo <shawn.guo@linaro.org>

Acked-by: Shawn Guo <shawn.guo@linaro.org>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 16/27] mmc: mxcmmc: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 16/27] mmc: mxcmmc: " Ulf Hansson
@ 2013-09-27  7:19   ` Sascha Hauer
  0 siblings, 0 replies; 46+ messages in thread
From: Sascha Hauer @ 2013-09-27  7:19 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, Anatolij Gustschin

On Thu, Sep 26, 2013 at 04:54:41PM +0200, Ulf Hansson wrote:
> 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: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>

Sascha

> ---
>  drivers/mmc/host/mxcmmc.c |   12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index c174c6a..f7199c8 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1250,28 +1250,20 @@ static int mxcmci_suspend(struct device *dev)
>  {
>  	struct mmc_host *mmc = dev_get_drvdata(dev);
>  	struct mxcmci_host *host = mmc_priv(mmc);
> -	int ret = 0;
>  
> -	if (mmc)
> -		ret = mmc_suspend_host(mmc);
>  	clk_disable_unprepare(host->clk_per);
>  	clk_disable_unprepare(host->clk_ipg);
> -
> -	return ret;
> +	return 0;
>  }
>  
>  static int mxcmci_resume(struct device *dev)
>  {
>  	struct mmc_host *mmc = dev_get_drvdata(dev);
>  	struct mxcmci_host *host = mmc_priv(mmc);
> -	int ret = 0;
>  
>  	clk_prepare_enable(host->clk_per);
>  	clk_prepare_enable(host->clk_ipg);
> -	if (mmc)
> -		ret = mmc_resume_host(mmc);
> -
> -	return ret;
> +	return 0;
>  }
>  
>  static const struct dev_pm_ops mxcmci_pm_ops = {
> -- 
> 1.7.9.5
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 09/27] mmc: mvsdio: Remove redundant suspend and resume callbacks
  2013-09-26 15:40   ` Nicolas Pitre
@ 2013-09-27  8:55     ` Ulf Hansson
  0 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-27  8:55 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: linux-kernel, linux-mmc, Chris Ball, Thomas Petazzoni,
	Jason Cooper, Andrew Lunn

On 26 September 2013 17:40, Nicolas Pitre <nicolas.pitre@linaro.org> wrote:
> On Thu, 26 Sep 2013, Ulf Hansson wrote:
>
>> Suspend and resume of cards are handled by the protocol layer and
>> consequently the mmc_suspend|resume_host APIs are marked as deprecated.
>
> Having the protocol layer take care of card suspend is perfectly sound.
>
> However, what about host controllers?  Shouldn't they suspend themselves
> as well?  There is certainly potential for power saving by gating clocks
> to the host IP block or the like.
>

Hi Nicolas,

You are right, host drivers shall be responsible to handle power
saving operations, like clocks, power domains, pinctrls, etc. In many
cases I think using only runtime PM should satisfy a host driver's
need to perform the proper power saving.

For mvsdio, there were no host power save operations done in the
suspend/resume callbacks, which is why I removed the callbacks
entirely.

Kind regards
Ulf Hansson

>
> Nicolas

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 04/27] mmc: cb710: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 04/27] mmc: cb710: " Ulf Hansson
@ 2013-09-27 16:08   ` Michał Mirosław
  0 siblings, 0 replies; 46+ messages in thread
From: Michał Mirosław @ 2013-09-27 16:08 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball

On Thu, Sep 26, 2013 at 04:54:29PM +0200, Ulf Hansson wrote:
> 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: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Patch looks consistent with commit message. I can't test it on HW, though.

Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 10/27] mmc: vub300: Remove redundant suspend and resume callbacks
@ 2013-09-27 16:22     ` Alan Stern
  0 siblings, 0 replies; 46+ messages in thread
From: Alan Stern @ 2013-09-27 16:22 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, Tony Olech, linux-usb

On Thu, 26 Sep 2013, Ulf Hansson wrote:

> 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: Tony Olech <tony.olech@elandigitalsystems.com>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/vub300.c |   30 ------------------------------
>  1 file changed, 30 deletions(-)
> 
> diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
> index e9028ad..db99edc 100644
> --- a/drivers/mmc/host/vub300.c
> +++ b/drivers/mmc/host/vub300.c
> @@ -2389,34 +2389,6 @@ static void vub300_disconnect(struct usb_interface *interface)
>  	}
>  }
>  
> -#ifdef CONFIG_PM
> -static int vub300_suspend(struct usb_interface *intf, pm_message_t message)
> -{
> -	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> -	if (!vub300 || !vub300->mmc) {
> -		return 0;
> -	} else {
> -		struct mmc_host *mmc = vub300->mmc;
> -		mmc_suspend_host(mmc);
> -		return 0;
> -	}
> -}
> -
> -static int vub300_resume(struct usb_interface *intf)
> -{
> -	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> -	if (!vub300 || !vub300->mmc) {
> -		return 0;
> -	} else {
> -		struct mmc_host *mmc = vub300->mmc;
> -		mmc_resume_host(mmc);
> -		return 0;
> -	}
> -}
> -#else
> -#define vub300_suspend NULL
> -#define vub300_resume NULL
> -#endif
>  static int vub300_pre_reset(struct usb_interface *intf)
>  {				/* NOT irq */
>  	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> @@ -2437,8 +2409,6 @@ static struct usb_driver vub300_driver = {
>  	.name = "vub300",
>  	.probe = vub300_probe,
>  	.disconnect = vub300_disconnect,
> -	.suspend = vub300_suspend,
> -	.resume = vub300_resume,
>  	.pre_reset = vub300_pre_reset,
>  	.post_reset = vub300_post_reset,
>  	.id_table = vub300_table,

You shouldn't do it this way.  The USB core treats drivers differently 
depending on whether their suspend and resume callbacks are defined.  
If those method pointers are NULL, the driver will be treated as though 
it doesn't support power management at all.

You should keep the pointers and the routines.  The contents of the 
routines can be removed, leaving nothing but a "return 0;" line.

Alan Stern


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 10/27] mmc: vub300: Remove redundant suspend and resume callbacks
@ 2013-09-27 16:22     ` Alan Stern
  0 siblings, 0 replies; 46+ messages in thread
From: Alan Stern @ 2013-09-27 16:22 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA, Chris Ball, Tony Olech,
	linux-usb-u79uwXL29TY76Z2rM5mHXA

On Thu, 26 Sep 2013, Ulf Hansson wrote:

> 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: Tony Olech <tony.olech-ze5PQcJzaeOs0fm86SgGizGjJy/sRE9J@public.gmane.org>
> Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Signed-off-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
>  drivers/mmc/host/vub300.c |   30 ------------------------------
>  1 file changed, 30 deletions(-)
> 
> diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
> index e9028ad..db99edc 100644
> --- a/drivers/mmc/host/vub300.c
> +++ b/drivers/mmc/host/vub300.c
> @@ -2389,34 +2389,6 @@ static void vub300_disconnect(struct usb_interface *interface)
>  	}
>  }
>  
> -#ifdef CONFIG_PM
> -static int vub300_suspend(struct usb_interface *intf, pm_message_t message)
> -{
> -	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> -	if (!vub300 || !vub300->mmc) {
> -		return 0;
> -	} else {
> -		struct mmc_host *mmc = vub300->mmc;
> -		mmc_suspend_host(mmc);
> -		return 0;
> -	}
> -}
> -
> -static int vub300_resume(struct usb_interface *intf)
> -{
> -	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> -	if (!vub300 || !vub300->mmc) {
> -		return 0;
> -	} else {
> -		struct mmc_host *mmc = vub300->mmc;
> -		mmc_resume_host(mmc);
> -		return 0;
> -	}
> -}
> -#else
> -#define vub300_suspend NULL
> -#define vub300_resume NULL
> -#endif
>  static int vub300_pre_reset(struct usb_interface *intf)
>  {				/* NOT irq */
>  	struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
> @@ -2437,8 +2409,6 @@ static struct usb_driver vub300_driver = {
>  	.name = "vub300",
>  	.probe = vub300_probe,
>  	.disconnect = vub300_disconnect,
> -	.suspend = vub300_suspend,
> -	.resume = vub300_resume,
>  	.pre_reset = vub300_pre_reset,
>  	.post_reset = vub300_post_reset,
>  	.id_table = vub300_table,

You shouldn't do it this way.  The USB core treats drivers differently 
depending on whether their suspend and resume callbacks are defined.  
If those method pointers are NULL, the driver will be treated as though 
it doesn't support power management at all.

You should keep the pointers and the routines.  The contents of the 
routines can be removed, leaving nothing but a "return 0;" line.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 22/27] mmc: sdricoh_cs: Move away from using deprecated APIs
  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
  0 siblings, 0 replies; 46+ messages in thread
From: Sascha Sommer @ 2013-09-29 17:56 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball

Hi,

Am Thu, 26 Sep 2013 16:54:47 +0200
schrieb Ulf Hansson <ulf.hansson@linaro.org>:

> 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: Sascha Sommer <saschasommer@freenet.de>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/sdricoh_cs.c |    3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdricoh_cs.c
> b/drivers/mmc/host/sdricoh_cs.c index 50adbd1..b7e3057 100644
> --- a/drivers/mmc/host/sdricoh_cs.c
> +++ b/drivers/mmc/host/sdricoh_cs.c
> @@ -516,9 +516,7 @@ static void sdricoh_pcmcia_detach(struct
> pcmcia_device *link) #ifdef CONFIG_PM
>  static int sdricoh_pcmcia_suspend(struct pcmcia_device *link)
>  {
> -	struct mmc_host *mmc = link->priv;
>  	dev_dbg(&link->dev, "suspend\n");
> -	mmc_suspend_host(mmc);
>  	return 0;
>  }
>  
> @@ -527,7 +525,6 @@ static int sdricoh_pcmcia_resume(struct
> pcmcia_device *link) struct mmc_host *mmc = link->priv;
>  	dev_dbg(&link->dev, "resume\n");
>  	sdricoh_reset(mmc_priv(mmc));
> -	mmc_resume_host(mmc);
>  	return 0;
>  }
>  #else

Acked-by: Sascha Sommer <saschasommer@freenet.de> 


Regards

Sascha

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 10/27] mmc: vub300: Remove redundant suspend and resume callbacks
  2013-09-27 16:22     ` Alan Stern
  (?)
@ 2013-09-30  8:24     ` Ulf Hansson
  -1 siblings, 0 replies; 46+ messages in thread
From: Ulf Hansson @ 2013-09-30  8:24 UTC (permalink / raw)
  To: Alan Stern; +Cc: linux-kernel, linux-mmc, Chris Ball, Tony Olech, linux-usb

On 27 September 2013 18:22, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Thu, 26 Sep 2013, Ulf Hansson wrote:
>
>> 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: Tony Olech <tony.olech@elandigitalsystems.com>
>> Cc: linux-usb@vger.kernel.org
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> ---
>>  drivers/mmc/host/vub300.c |   30 ------------------------------
>>  1 file changed, 30 deletions(-)
>>
>> diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c
>> index e9028ad..db99edc 100644
>> --- a/drivers/mmc/host/vub300.c
>> +++ b/drivers/mmc/host/vub300.c
>> @@ -2389,34 +2389,6 @@ static void vub300_disconnect(struct usb_interface *interface)
>>       }
>>  }
>>
>> -#ifdef CONFIG_PM
>> -static int vub300_suspend(struct usb_interface *intf, pm_message_t message)
>> -{
>> -     struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
>> -     if (!vub300 || !vub300->mmc) {
>> -             return 0;
>> -     } else {
>> -             struct mmc_host *mmc = vub300->mmc;
>> -             mmc_suspend_host(mmc);
>> -             return 0;
>> -     }
>> -}
>> -
>> -static int vub300_resume(struct usb_interface *intf)
>> -{
>> -     struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
>> -     if (!vub300 || !vub300->mmc) {
>> -             return 0;
>> -     } else {
>> -             struct mmc_host *mmc = vub300->mmc;
>> -             mmc_resume_host(mmc);
>> -             return 0;
>> -     }
>> -}
>> -#else
>> -#define vub300_suspend NULL
>> -#define vub300_resume NULL
>> -#endif
>>  static int vub300_pre_reset(struct usb_interface *intf)
>>  {                            /* NOT irq */
>>       struct vub300_mmc_host *vub300 = usb_get_intfdata(intf);
>> @@ -2437,8 +2409,6 @@ static struct usb_driver vub300_driver = {
>>       .name = "vub300",
>>       .probe = vub300_probe,
>>       .disconnect = vub300_disconnect,
>> -     .suspend = vub300_suspend,
>> -     .resume = vub300_resume,
>>       .pre_reset = vub300_pre_reset,
>>       .post_reset = vub300_post_reset,
>>       .id_table = vub300_table,
>
> You shouldn't do it this way.  The USB core treats drivers differently
> depending on whether their suspend and resume callbacks are defined.
> If those method pointers are NULL, the driver will be treated as though
> it doesn't support power management at all.
>
> You should keep the pointers and the routines.  The contents of the
> routines can be removed, leaving nothing but a "return 0;" line.

Thanks for your comment Alan. Did not know USB core was handling the
callbacks like that, should of course have checked that.

Instead of sending a v2, I have dropped this patch and just sent a new
one with an updated commit message as well.

Kind regards
Ulf Hansson

>
> Alan Stern
>

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 03/27] mmc: bfin_sdh: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 03/27] mmc: bfin_sdh: " Ulf Hansson
@ 2013-10-08  3:05   ` Sonic Zhang
  0 siblings, 0 replies; 46+ messages in thread
From: Sonic Zhang @ 2013-10-08  3:05 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Linux Kernel, linux-mmc, Chris Ball, Sonic Zhang, uclinux-dist-devel

Acked-by: Sonic Zhang <sonic.zhang@analog.com>

On Thu, Sep 26, 2013 at 10:54 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 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: Sonic Zhang <sonic.zhang@analog.com>
> Cc: uclinux-dist-devel@blackfin.uclinux.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/host/bfin_sdh.c |   12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c
> index 94fae2f..bc9110f 100644
> --- a/drivers/mmc/host/bfin_sdh.c
> +++ b/drivers/mmc/host/bfin_sdh.c
> @@ -640,21 +640,15 @@ static int sdh_remove(struct platform_device *pdev)
>  #ifdef CONFIG_PM
>  static int sdh_suspend(struct platform_device *dev, pm_message_t state)
>  {
> -       struct mmc_host *mmc = platform_get_drvdata(dev);
>         struct bfin_sd_host *drv_data = get_sdh_data(dev);
> -       int ret = 0;
> -
> -       if (mmc)
> -               ret = mmc_suspend_host(mmc);
>
>         peripheral_free_list(drv_data->pin_req);
>
> -       return ret;
> +       return 0;
>  }
>
>  static int sdh_resume(struct platform_device *dev)
>  {
> -       struct mmc_host *mmc = platform_get_drvdata(dev);
>         struct bfin_sd_host *drv_data = get_sdh_data(dev);
>         int ret = 0;
>
> @@ -665,10 +659,6 @@ static int sdh_resume(struct platform_device *dev)
>         }
>
>         sdh_reset();
> -
> -       if (mmc)
> -               ret = mmc_resume_host(mmc);
> -
>         return ret;
>  }
>  #else
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs
  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
  0 siblings, 0 replies; 46+ messages in thread
From: Balaji T K @ 2013-10-10 14:06 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, linux-omap

On Thursday 26 September 2013 08:24 PM, Ulf Hansson wrote:
> 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. Additional cleanup done for keeping track
> suspended state.
>
> Cc: Balaji T K <balajitk@ti.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Acked-by: Balaji T K <balajitk@ti.com>

> ---
>   drivers/mmc/host/omap_hsmmc.c |   37 +++----------------------------------
>   1 file changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 6ac63df..eb6fb28 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -170,7 +170,6 @@ struct omap_hsmmc_host {
>   	unsigned int		dma_sg_idx;
>   	unsigned char		bus_mode;
>   	unsigned char		power_mode;
> -	int			suspended;
>   	int			irq;
>   	int			use_dma, dma_ch;
>   	struct dma_chan		*tx_chan;
> @@ -1178,9 +1177,6 @@ static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
>   	struct omap_mmc_slot_data *slot = &mmc_slot(host);
>   	int carddetect;
>
> -	if (host->suspended)
> -		return IRQ_HANDLED;
> -
>   	sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
>
>   	if (slot->card_detect)
> @@ -1643,11 +1639,6 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
>   	seq_printf(s, "mmc%d:\n ctx_loss:\t%d:%d\n\nregs:\n",
>   			mmc->index, host->context_loss, context_loss);
>
> -	if (host->suspended) {
> -		seq_printf(s, "host suspended, can't read registers\n");
> -		return 0;
> -	}
> -
>   	pm_runtime_get_sync(host->dev);
>
>   	seq_printf(s, "CON:\t\t0x%08x\n",
> @@ -2119,23 +2110,12 @@ static void omap_hsmmc_complete(struct device *dev)
>
>   static int omap_hsmmc_suspend(struct device *dev)
>   {
> -	int ret = 0;
>   	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
>
>   	if (!host)
>   		return 0;
>
> -	if (host && host->suspended)
> -		return 0;
> -
>   	pm_runtime_get_sync(host->dev);
> -	host->suspended = 1;
> -	ret = mmc_suspend_host(host->mmc);
> -
> -	if (ret) {
> -		host->suspended = 0;
> -		goto err;
> -	}
>
>   	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
>   		omap_hsmmc_disable_irq(host);
> @@ -2145,23 +2125,19 @@ static int omap_hsmmc_suspend(struct device *dev)
>
>   	if (host->dbclk)
>   		clk_disable_unprepare(host->dbclk);
> -err:
> +
>   	pm_runtime_put_sync(host->dev);
> -	return ret;
> +	return 0;
>   }
>
>   /* Routine to resume the MMC device */
>   static int omap_hsmmc_resume(struct device *dev)
>   {
> -	int ret = 0;
>   	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
>
>   	if (!host)
>   		return 0;
>
> -	if (host && !host->suspended)
> -		return 0;
> -
>   	pm_runtime_get_sync(host->dev);
>
>   	if (host->dbclk)
> @@ -2172,16 +2148,9 @@ static int omap_hsmmc_resume(struct device *dev)
>
>   	omap_hsmmc_protect_card(host);
>
> -	/* Notify the core to resume the host */
> -	ret = mmc_resume_host(host->mmc);
> -	if (ret == 0)
> -		host->suspended = 0;
> -
>   	pm_runtime_mark_last_busy(host->dev);
>   	pm_runtime_put_autosuspend(host->dev);
> -
> -	return ret;
> -
> +	return 0;
>   }
>
>   #else
>


^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH 14/27] mmc: omap_hsmmc: Move away from using deprecated APIs
@ 2013-10-10 14:06     ` Balaji T K
  0 siblings, 0 replies; 46+ messages in thread
From: Balaji T K @ 2013-10-10 14:06 UTC (permalink / raw)
  To: Ulf Hansson; +Cc: linux-kernel, linux-mmc, Chris Ball, linux-omap

On Thursday 26 September 2013 08:24 PM, Ulf Hansson wrote:
> 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. Additional cleanup done for keeping track
> suspended state.
>
> Cc: Balaji T K <balajitk@ti.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Acked-by: Balaji T K <balajitk@ti.com>

> ---
>   drivers/mmc/host/omap_hsmmc.c |   37 +++----------------------------------
>   1 file changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 6ac63df..eb6fb28 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -170,7 +170,6 @@ struct omap_hsmmc_host {
>   	unsigned int		dma_sg_idx;
>   	unsigned char		bus_mode;
>   	unsigned char		power_mode;
> -	int			suspended;
>   	int			irq;
>   	int			use_dma, dma_ch;
>   	struct dma_chan		*tx_chan;
> @@ -1178,9 +1177,6 @@ static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
>   	struct omap_mmc_slot_data *slot = &mmc_slot(host);
>   	int carddetect;
>
> -	if (host->suspended)
> -		return IRQ_HANDLED;
> -
>   	sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch");
>
>   	if (slot->card_detect)
> @@ -1643,11 +1639,6 @@ static int omap_hsmmc_regs_show(struct seq_file *s, void *data)
>   	seq_printf(s, "mmc%d:\n ctx_loss:\t%d:%d\n\nregs:\n",
>   			mmc->index, host->context_loss, context_loss);
>
> -	if (host->suspended) {
> -		seq_printf(s, "host suspended, can't read registers\n");
> -		return 0;
> -	}
> -
>   	pm_runtime_get_sync(host->dev);
>
>   	seq_printf(s, "CON:\t\t0x%08x\n",
> @@ -2119,23 +2110,12 @@ static void omap_hsmmc_complete(struct device *dev)
>
>   static int omap_hsmmc_suspend(struct device *dev)
>   {
> -	int ret = 0;
>   	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
>
>   	if (!host)
>   		return 0;
>
> -	if (host && host->suspended)
> -		return 0;
> -
>   	pm_runtime_get_sync(host->dev);
> -	host->suspended = 1;
> -	ret = mmc_suspend_host(host->mmc);
> -
> -	if (ret) {
> -		host->suspended = 0;
> -		goto err;
> -	}
>
>   	if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) {
>   		omap_hsmmc_disable_irq(host);
> @@ -2145,23 +2125,19 @@ static int omap_hsmmc_suspend(struct device *dev)
>
>   	if (host->dbclk)
>   		clk_disable_unprepare(host->dbclk);
> -err:
> +
>   	pm_runtime_put_sync(host->dev);
> -	return ret;
> +	return 0;
>   }
>
>   /* Routine to resume the MMC device */
>   static int omap_hsmmc_resume(struct device *dev)
>   {
> -	int ret = 0;
>   	struct omap_hsmmc_host *host = dev_get_drvdata(dev);
>
>   	if (!host)
>   		return 0;
>
> -	if (host && !host->suspended)
> -		return 0;
> -
>   	pm_runtime_get_sync(host->dev);
>
>   	if (host->dbclk)
> @@ -2172,16 +2148,9 @@ static int omap_hsmmc_resume(struct device *dev)
>
>   	omap_hsmmc_protect_card(host);
>
> -	/* Notify the core to resume the host */
> -	ret = mmc_resume_host(host->mmc);
> -	if (ret == 0)
> -		host->suspended = 0;
> -
>   	pm_runtime_mark_last_busy(host->dev);
>   	pm_runtime_put_autosuspend(host->dev);
> -
> -	return ret;
> -
> +	return 0;
>   }
>
>   #else
>


^ permalink raw reply	[flat|nested] 46+ messages in thread

* RE: [PATCH 06/27] mmc: dw_mmc: Move away from using deprecated APIs
  2013-09-26 14:54 ` [PATCH 06/27] mmc: dw_mmc: " Ulf Hansson
@ 2013-10-23 11:17   ` Seungwon Jeon
  0 siblings, 0 replies; 46+ messages in thread
From: Seungwon Jeon @ 2013-10-23 11:17 UTC (permalink / raw)
  To: 'Ulf Hansson', linux-kernel, linux-mmc, 'Chris Ball'
  Cc: 'Jaehoon Chung'

On Thu, September 26, 2013, Ulf Hansson wrote:
> 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: Seungwon Jeon <tgih.jun@samsung.com>

Acked-by: Seungwon Jeon <tgih.jun@samsung.com>

Thanks,
Seungwon Jeon



^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2013-10-23 11:17 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-26 14:54 [PATCH 00/27] mmc: Remove the deprecated APIs mmc_suspend|resume_host Ulf Hansson
2013-09-26 14:54 ` [PATCH 01/27] mmc: atmel-mci: Remove redundant suspend and resume callbacks Ulf Hansson
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-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-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-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   ` 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   ` Ulf Hansson
2013-09-26 14:54   ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.