From: Kisang Lee Date: Fri, 18 May 2018 06:08:46 +0000 (+0900) Subject: Revert "[HACK] usb: force notification to start gadget" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d57e85067d1303ac84f71c86b2a32a8a041ad8b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Revert "[HACK] usb: force notification to start gadget" This reverts commit 40e89a2be029b81cb5c6740ee355826e740e5baa. Change-Id: Id1bd27297ebb2daea82d8591d502caef98eb7527 Signed-off-by: Kisang Lee --- diff --git a/drivers/muic/s2mu004-muic.c b/drivers/muic/s2mu004-muic.c index 8d1af9470663..4ce270d10cc5 100644 --- a/drivers/muic/s2mu004-muic.c +++ b/drivers/muic/s2mu004-muic.c @@ -1067,7 +1067,6 @@ int s2mu004_muic_refresh_adc(struct s2mu004_muic_data *muic_data) } #endif -extern void b_sess_control(int val); int s2mu004_muic_get_vbus_state(struct s2mu004_muic_data *muic_data) { struct i2c_client *i2c = muic_data->i2c; @@ -1078,11 +1077,6 @@ int s2mu004_muic_get_vbus_state(struct s2mu004_muic_data *muic_data) vbus = !!(reg_val & DEV_TYPE_APPLE_VBUS_WAKEUP); pr_info("%s vbus : (%d)\n", __func__, vbus); - if (vbus == 1) - b_sess_control(1); - else - b_sess_control(0); - return vbus; } diff --git a/drivers/usb/dwc3/otg.c b/drivers/usb/dwc3/otg.c index aa2c135ae92b..aa21ba4b0802 100644 --- a/drivers/usb/dwc3/otg.c +++ b/drivers/usb/dwc3/otg.c @@ -520,18 +520,6 @@ dwc3_otg_show_b_sess(struct device *dev, return snprintf(buf, PAGE_SIZE, "%d\n", fsm->b_sess_vld); } -struct dwc3 *g_dwc3; -void b_sess_control(int val) -{ - struct dwc3 *dwc = g_dwc3; - struct otg_fsm *fsm = &dwc->dotg->fsm; - - fsm->b_sess_vld = !!val; - - dwc3_otg_run_sm(fsm); -} -EXPORT_SYMBOL_GPL(b_sess_control); - static ssize_t dwc3_otg_store_b_sess(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) @@ -674,8 +662,6 @@ int dwc3_otg_init(struct dwc3 *dwc) struct dwc3_ext_otg_ops *ops = NULL; int ret = 0; - g_dwc3 = dwc; - dev_info(dwc->dev, "%s\n", __func__); /* EXYNOS SoCs don't have HW OTG, but support SW OTG. */