mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 28 Feb 2014 11:49:00 +0000 (12:49 +0100)
committerChris Ball <chris@printf.net>
Tue, 22 Apr 2014 11:06:40 +0000 (07:06 -0400)
commit573185cc7e646fdd5da12702ba5383e91cc25ef3
treede598dc7d6854ec38208a4f5f1f2f0df6984daf0
parentf7bf11a3a2e0ee829a262b4b0bb09c2bb40cf6fa
mmc: core: Invoke sdio func driver's PM callbacks from the sdio bus

The sdio func device is added to the driver model after the card
device.

This means the sdio func device will be suspend before the card device
and thus resumed after. The consequence are the mmc core don't
explicity need to protect itself from receiving sdio requests in
suspended state. Instead that can be handled from the sdio bus, which
is thus invokes the PM callbacks instead of old dummy function.

In the case were the sdio func driver don't implement the PM callbacks
the mmc core will in the early phase of system suspend, remove the
card from the driver model and thus power off it.

Cc: Aaron Lu <aaron.lu@intel.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Tested-by: xiaoming wang <xiaoming.wang@intel.com>
Tested-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio_bus.c