|
@@ -238,15 +238,6 @@ static int ssusb_extcon_register(struct otg_switch_mtk *otg_sx)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void extcon_register_dwork(struct work_struct *work)
|
|
|
-{
|
|
|
- struct delayed_work *dwork = to_delayed_work(work);
|
|
|
- struct otg_switch_mtk *otg_sx =
|
|
|
- container_of(dwork, struct otg_switch_mtk, extcon_reg_dwork);
|
|
|
-
|
|
|
- ssusb_extcon_register(otg_sx);
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* We provide an interface via debugfs to switch between host and device modes
|
|
|
* depending on user input.
|
|
@@ -407,18 +398,10 @@ int ssusb_otg_switch_init(struct ssusb_mtk *ssusb)
|
|
|
{
|
|
|
struct otg_switch_mtk *otg_sx = &ssusb->otg_switch;
|
|
|
|
|
|
- if (otg_sx->manual_drd_enabled) {
|
|
|
+ if (otg_sx->manual_drd_enabled)
|
|
|
ssusb_debugfs_init(ssusb);
|
|
|
- } else {
|
|
|
- INIT_DELAYED_WORK(&otg_sx->extcon_reg_dwork,
|
|
|
- extcon_register_dwork);
|
|
|
-
|
|
|
- /*
|
|
|
- * It is enough to delay 1s for waiting for
|
|
|
- * host initialization
|
|
|
- */
|
|
|
- schedule_delayed_work(&otg_sx->extcon_reg_dwork, HZ);
|
|
|
- }
|
|
|
+ else
|
|
|
+ ssusb_extcon_register(otg_sx);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -429,6 +412,4 @@ void ssusb_otg_switch_exit(struct ssusb_mtk *ssusb)
|
|
|
|
|
|
if (otg_sx->manual_drd_enabled)
|
|
|
ssusb_debugfs_exit(ssusb);
|
|
|
- else
|
|
|
- cancel_delayed_work(&otg_sx->extcon_reg_dwork);
|
|
|
}
|