[COMMON] usb: notify: add wake_unlock for balance
authorKisang Lee <kisang80.lee@samsung.com>
Wed, 18 Jul 2018 00:54:49 +0000 (09:54 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:04:36 +0000 (17:04 +0900)
Change-Id: I31a6ccf789093ba6093a7394dce6a1c27500cc65
Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
drivers/usb/notify/usb_notify.c

index 973718c924b0ee411824fad621df26816b1f1d3e..223ca421f7ba876d6de468ffa2f9f94814261599 100644 (file)
@@ -808,6 +808,9 @@ static void otg_notify_state(struct otg_notify *n,
                if (enable) {
                        n->charger_detect = 1;
                        if (n->usb_noti_done) {
+                               if (n->is_wakelock)
+                                       wake_unlock(&u_notify->wlock);
+
                                n->set_charger(enable);
                                n->usb_noti_done = 0;
                        }