usb: dwc2: gadget: cleanup useless code
diff mbox

Message ID 1430033738-20914-1-git-send-email-lyz@rock-chips.com
State New, archived
Headers show

Commit Message

LiYunzhi April 26, 2015, 7:35 a.m. UTC
dwc2 gadget driver s3c_hsotg_of_probe() run twice in
dwc2_gadget_init() and the first one is useless, so remove it.

Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
---
 drivers/usb/dwc2/gadget.c | 2 --
 1 file changed, 2 deletions(-)

Comments

John Youn April 28, 2015, 10:50 p.m. UTC | #1
On 4/26/2015 12:36 AM, Yunzhi Li wrote:
> dwc2 gadget driver s3c_hsotg_of_probe() run twice in
> dwc2_gadget_init() and the first one is useless, so remove it.
> 
> Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
> ---
>  drivers/usb/dwc2/gadget.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index 6a30887..2ae74f2 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -3851,8 +3851,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
>  	/* Set default UTMI width */
>  	hsotg->phyif = GUSBCFG_PHYIF16;
>  
> -	s3c_hsotg_of_probe(hsotg);
> -
>  	/* Initialize to legacy fifo configuration values */
>  	hsotg->g_rx_fifo_sz = 2048;
>  	hsotg->g_np_g_tx_fifo_sz = 1024;
> 


Acked-by: John Youn <johnyoun@synopsys.com>
John Youn April 28, 2015, 10:58 p.m. UTC | #2
On 4/28/2015 3:50 PM, John Youn wrote:
> On 4/26/2015 12:36 AM, Yunzhi Li wrote:
>> dwc2 gadget driver s3c_hsotg_of_probe() run twice in
>> dwc2_gadget_init() and the first one is useless, so remove it.
>>
>> Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
>> ---
>>  drivers/usb/dwc2/gadget.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
>> index 6a30887..2ae74f2 100644
>> --- a/drivers/usb/dwc2/gadget.c
>> +++ b/drivers/usb/dwc2/gadget.c
>> @@ -3851,8 +3851,6 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
>>  	/* Set default UTMI width */
>>  	hsotg->phyif = GUSBCFG_PHYIF16;
>>  
>> -	s3c_hsotg_of_probe(hsotg);
>> -
>>  	/* Initialize to legacy fifo configuration values */
>>  	hsotg->g_rx_fifo_sz = 2048;
>>  	hsotg->g_np_g_tx_fifo_sz = 1024;
>>
> 
> 
> Acked-by: John Youn <johnyoun@synopsys.com>
> 

Added Felipe.

John

Patch
diff mbox

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 6a30887..2ae74f2 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3851,8 +3851,6 @@  int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)
 	/* Set default UTMI width */
 	hsotg->phyif = GUSBCFG_PHYIF16;
 
-	s3c_hsotg_of_probe(hsotg);
-
 	/* Initialize to legacy fifo configuration values */
 	hsotg->g_rx_fifo_sz = 2048;
 	hsotg->g_np_g_tx_fifo_sz = 1024;