mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 25 Jan 2022 05:50:06 +0000 (13:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:24:14 +0000 (14:24 +0200)
commit8ec990990be3b59ce4a7ac5a53432f4c2f79a96d
treefee1d1875c55b534c432efb484c5fabe0790173f
parent50c906a6977f1a2261be37cbf49762000acbf508
mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM

commit 7499b529d97f752124fa62fefa1d6d44b371215a upstream.

Commit 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") doesn't
use pm_runtime_{get,put}() helpers when it should, so the RPM refcount
keeps at zero, hence its parent driver, rtsx_pci, has to do lots of
weird tricks to keep it from runtime suspending.

So use those helpers at right places to properly manage runtime PM.

Fixes: 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM")
Cc: Ricky WU <ricky_wu@realtek.com>
Tested-by: Ricky WU <ricky_wu@realtek.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20220125055010.1866563-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/host/rtsx_pci_sdmmc.c