OSDN Git Service

Bluetooth: btmtksdio: handle runtime pm only when sdio_func is available
authorSean Wang <sean.wang@mediatek.com>
Wed, 1 Dec 2021 18:02:46 +0000 (02:02 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 3 Dec 2021 21:09:59 +0000 (22:09 +0100)
commit4b4b2228f521c338030b1f310a5dee73fd7d8f26
treedcfbadfb7cd4cd519ecb21174ed362fc232e3f93
parentc97a747efc93f94a4ad6c707972dfbf8d774edf9
Bluetooth: btmtksdio: handle runtime pm only when sdio_func is available

Runtime pm ops is not aware the sdio_func status that is probably
being disabled by btmtksdio_close. Thus, we are only able to access the
sdio_func for the runtime pm operations only when the sdio_func is
available.

Fixes: 7f3c563c575e7 ("Bluetooth: btmtksdio: Add runtime PM support to SDIO based Bluetooth")
Co-developed-by: Mark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: Mark-yw Chen <mark-yw.chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/btmtksdio.c