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>
Wed, 26 Jan 2022 17:53:28 +0000 (18:53 +0100)
commit7499b529d97f752124fa62fefa1d6d44b371215a
treee6bde057f3a906b62f21f0bc6d2933b339630ddc
parent6d01f36f9e49e17c3473fc5d9af67b5f32df5c87
mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM

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>
drivers/mmc/host/rtsx_pci_sdmmc.c