]> git.hungrycats.org Git - linux/commit
mfd: rtsx_usb: Fix runtime PM deadlock
authorRoger Tseng <rogerable@realtek.com>
Thu, 15 Jan 2015 07:14:44 +0000 (15:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2015 01:40:42 +0000 (17:40 -0800)
commit28de6f351a65d7516f80337d5bc80d3ea948480d
treea867592c3d3896d35616f8569b21d504025f6873
parent5a8405ca2159a696b8eb535642505bbe9c4e1328
mfd: rtsx_usb: Fix runtime PM deadlock

commit b166010f6afbadb896efa37ff85eb681a8f89392 upstream.

sd_set_power_mode() in derived module drivers/mmc/host/rtsx_usb_sdmmc.c
acquires dev_mutex and then calls pm_runtime_get_sync() to make sure the
device is awake while initializing a newly inserted card. Once it is
called during suspending state and explicitly before rtsx_usb_suspend()
acquires the same dev_mutex, both routine deadlock and further hang the
driver because pm_runtime_get_sync() waits the pending PM operations.

Fix this by using an empty suspend method. mmc_core always turns the
LED off after a request is done and thus it is ok to remove the only
rtsx_usb_turn_off_led() here.

Fixes: 730876be2566 ("mfd: Add realtek USB card reader driver")
Signed-off-by: Roger Tseng <rogerable@realtek.com>
[Lee: Removed newly unused variable]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/rtsx_usb.c