OSDN Git Service

mmc: core: Increase the runtime PM reference count in try_claim_host
authorVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Tue, 4 Apr 2017 07:08:24 +0000 (12:38 +0530)
committerVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Tue, 4 Apr 2017 11:30:02 +0000 (17:00 +0530)
commit26e54a44f6b4fa3b59e6bb404811b975a3d21bb4
treed4deeae4fedc364d7a77444e8d94d530eb9300cf
parent9af69213de642f19b19f77e04f23de9f66b6b0f0
mmc: core: Increase the runtime PM reference count in try_claim_host

Runtime PM reference count is being increased in mmc_claim_host() and
is decreased in mmc_release_host(). This reference count is kept
during the complete cycle of a claim -> release host.

Same need to be done even in mmc_try_claim_host() as well. Increase
the runtime PM reference count by invoking pm_runtime_get_sync() from
mmc_try_claim_host() upon first successful claim.

Without this change the runtime PM reference count goes for a toss
since count is not getting incremented in mmc_try_claim_host() but is
getting decremented in mmc_release_host().

Change-Id: I77836875b4700a4bf3dbde2bf1abdf2ad36c4cac
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
drivers/mmc/core/core.c