Re: [PATCH] mmc: sdio: Removing the unnecessary runtime_get/put in sdio_bus_remove()

2012-12-18 Thread Ohad Ben-Cohen
On Wed, Dec 19, 2012 at 4:51 PM, Chuansheng Liu
 wrote:
>
> The runtime_get_sync() is called during sdio_bus_probe(), then the device
> will be kept in active runtime state

Unless, of course, the driver powered it down.

>, so not neccessary to call
> runtime_get_sync/put_noidle() again in sdio_bus_remove().

See comment above...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mmc: sdio: Removing the unnecessary runtime_get/put in sdio_bus_remove()

2012-12-18 Thread Chuansheng Liu

The runtime_get_sync() is called during sdio_bus_probe(), then the device
will be kept in active runtime state, so not neccessary to call
runtime_get_sync/put_noidle() again in sdio_bus_remove().

Signed-off-by: liu chuansheng 
---
 drivers/mmc/core/sdio_bus.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 5e57048..b576b70 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -167,10 +167,6 @@ static int sdio_bus_remove(struct device *dev)
struct sdio_func *func = dev_to_sdio_func(dev);
int ret = 0;
 
-   /* Make sure card is powered before invoking ->remove() */
-   if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD)
-   pm_runtime_get_sync(dev);
-
drv->remove(func);
 
if (func->irq_handler) {
@@ -181,10 +177,6 @@ static int sdio_bus_remove(struct device *dev)
sdio_release_host(func);
}
 
-   /* First, undo the increment made directly above */
-   if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD)
-   pm_runtime_put_noidle(dev);
-
/* Then undo the runtime PM settings in sdio_bus_probe() */
if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD)
pm_runtime_put_sync(dev);
-- 
1.7.0.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] mmc: sdio: Removing the unnecessary runtime_get/put in sdio_bus_remove()

2012-12-18 Thread Chuansheng Liu

The runtime_get_sync() is called during sdio_bus_probe(), then the device
will be kept in active runtime state, so not neccessary to call
runtime_get_sync/put_noidle() again in sdio_bus_remove().

Signed-off-by: liu chuansheng chuansheng@intel.com
---
 drivers/mmc/core/sdio_bus.c |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 5e57048..b576b70 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -167,10 +167,6 @@ static int sdio_bus_remove(struct device *dev)
struct sdio_func *func = dev_to_sdio_func(dev);
int ret = 0;
 
-   /* Make sure card is powered before invoking -remove() */
-   if (func-card-host-caps  MMC_CAP_POWER_OFF_CARD)
-   pm_runtime_get_sync(dev);
-
drv-remove(func);
 
if (func-irq_handler) {
@@ -181,10 +177,6 @@ static int sdio_bus_remove(struct device *dev)
sdio_release_host(func);
}
 
-   /* First, undo the increment made directly above */
-   if (func-card-host-caps  MMC_CAP_POWER_OFF_CARD)
-   pm_runtime_put_noidle(dev);
-
/* Then undo the runtime PM settings in sdio_bus_probe() */
if (func-card-host-caps  MMC_CAP_POWER_OFF_CARD)
pm_runtime_put_sync(dev);
-- 
1.7.0.4



--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mmc: sdio: Removing the unnecessary runtime_get/put in sdio_bus_remove()

2012-12-18 Thread Ohad Ben-Cohen
On Wed, Dec 19, 2012 at 4:51 PM, Chuansheng Liu
chuansheng@intel.com wrote:

 The runtime_get_sync() is called during sdio_bus_probe(), then the device
 will be kept in active runtime state

Unless, of course, the driver powered it down.

, so not neccessary to call
 runtime_get_sync/put_noidle() again in sdio_bus_remove().

See comment above...
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/