From: Ohad Ben-Cohen Date: Thu, 9 Jun 2011 23:40:27 +0000 (+0000) Subject: mmc: sdio: fix runtime PM path during driver removal X-Git-Tag: v3.0-rc5~23^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=297c7f2f158f7dfa9ab5813260ff954f9c2f83d2;p=pandora-kernel.git mmc: sdio: fix runtime PM path during driver removal After commit e1866b3 "PM / Runtime: Rework runtime PM handling during driver removal" was introduced, the driver core stopped incrementing the runtime PM usage counter of the device during the invocation of the ->remove() callback. This indirectly broke SDIO's runtime PM path during driver removal, because no one calls _put_sync() anymore after ->remove() completes. This means that the power of runtime-PM-managed SDIO cards is kept high after their driver is removed (even if it was powered down beforehand). Fix that by directly calling _put_sync() when the last usage counter is downref'ed by the SDIO bus. Reported-and-tested-by: Daniel Drake Signed-off-by: Ohad Ben-Cohen Signed-off-by: Chris Ball --- Reading git-diff-tree failed