power: rk817_charger: fix error of Unbalanced enable for IRQ

------------[ cut here ]------------
WARNING: at kernel/irq/manage.c:513
Modules linked in: bifrost_kbase
CPU: 1 PID: 41 Comm: kworker/u8:1 Not tainted 4.4.138 #373
Hardware name: Rockchip PX30 yito board (DT)
Workqueue: rk817-usb-wq rk817_charge_host_evt_worker
task: ffffffc0107ca880 task.stack: ffffffc07bc20000
PC is at __enable_irq+0x38/0x60
LR is at __enable_irq+0x38/0x60
...
Call trace:
 __enable_irq+0x38/0x60
 enable_irq+0x88/0x9c
 rk817_charge_set_otg_state+0x140/0x15c
 rk817_charge_host_evt_worker+0x8c/0xc0
 process_one_work+0x274/0x3c4
 worker_thread+0x2d8/0x398
 kthread+0xe8/0xf8
 ret_from_fork+0x10/0x30

Change-Id: Id044e8e9dbec7f6e07fd8377a18717208b13b434
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
This commit is contained in:
Shunqing Chen
2020-05-21 10:16:04 +08:00
committed by Tao Huang
parent b666ebc49f
commit 0517528b8e

View File

@@ -1248,8 +1248,6 @@ static int rk817_charge_usb_init(struct rk817_charger *charge)
charge->cable_edev = edev;
schedule_delayed_work(&charge->host_work, 0);
schedule_delayed_work(&charge->usb_work, 0);
DBG("register typec extcon evt notifier\n");
} else {
INIT_DELAYED_WORK(&charge->usb_work,
@@ -1638,6 +1636,11 @@ static int rk817_charge_probe(struct platform_device *pdev)
goto irq_fail;
}
if (charge->pdata->extcon) {
schedule_delayed_work(&charge->host_work, 0);
schedule_delayed_work(&charge->usb_work, 0);
}
rk817_chage_debug(charge);
DBG("driver version: %s\n", CHARGE_DRIVER_VERSION);