|
@@ -18,6 +18,7 @@
|
|
|
#include <linux/delay.h>
|
|
#include <linux/delay.h>
|
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
|
+#include <linux/pm_runtime.h>
|
|
|
|
|
|
|
|
#define DRIVER_NAME "memstick"
|
|
#define DRIVER_NAME "memstick"
|
|
|
|
|
|
|
@@ -436,6 +437,7 @@ static void memstick_check(struct work_struct *work)
|
|
|
struct memstick_dev *card;
|
|
struct memstick_dev *card;
|
|
|
|
|
|
|
|
dev_dbg(&host->dev, "memstick_check started\n");
|
|
dev_dbg(&host->dev, "memstick_check started\n");
|
|
|
|
|
+ pm_runtime_get_noresume(host->dev.parent);
|
|
|
mutex_lock(&host->lock);
|
|
mutex_lock(&host->lock);
|
|
|
if (!host->card) {
|
|
if (!host->card) {
|
|
|
if (memstick_power_on(host))
|
|
if (memstick_power_on(host))
|
|
@@ -479,6 +481,7 @@ out_power_off:
|
|
|
host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
|
|
host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF);
|
|
|
|
|
|
|
|
mutex_unlock(&host->lock);
|
|
mutex_unlock(&host->lock);
|
|
|
|
|
+ pm_runtime_put(host->dev.parent);
|
|
|
dev_dbg(&host->dev, "memstick_check finished\n");
|
|
dev_dbg(&host->dev, "memstick_check finished\n");
|
|
|
}
|
|
}
|
|
|
|
|
|