usb: mtu3: fix warning of sleep in atomic context in notifier callback
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Wed, 23 May 2018 08:53:20 +0000 (16:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 May 2018 16:09:37 +0000 (18:09 +0200)
commit681e9485241463e1e8d8cfd0a11fb252f49c997f
tree8c28668617df61b5bf0be60f3773f601a27299c2
parent4f9f032c256c3fc8ed23461e71d7acf3363a969f
usb: mtu3: fix warning of sleep in atomic context in notifier callback

The notifier callbacks of extcon are called in atomic context, but the
callbacks will call regulator_enable()/regulator_disable() which may
sleep caused by mutex, so use work queue to call the sleep functions.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3.h
drivers/usb/mtu3/mtu3_dr.c