Skip to contentSkip to conversation

usb: gadget: Remove duplicated function declaration in pxa27x_udc

PATCH New Petr Cvek 2 participants 4 messages Feb 23, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Petr Cvek

author
#1 lore raw

PATCH 1/2 usb: gadget: Remove duplicated function declaration in pxa27x_udc

Remove duplicated function declaration for udc_enable() and udc_disable().

---
 drivers/usb/gadget/udc/pxa27x_udc.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/usb/gadget/udc/pxa27x_udc.c +0 -3
index 7fa60f5b7ae4..6fa675bf2c6f 100644
@@ -1608,9 +1608,6 @@ static int pxa_udc_pullup(struct usb_gadget *_gadget, int is_active)
 	return 0;
 }
 
-static void udc_enable(struct pxa_udc *udc);
-static void udc_disable(struct pxa_udc *udc);
-
 /**
  * pxa_udc_vbus_session - Called by external transceiver to enable/disable udc
  * @_gadget: usb gadget
Signature · 1 line
2.11.0
maintainer
#2 lore raw

PATCH 1/2 usb: gadget: Remove duplicated function declaration in pxa27x_udc

Quoted 1 line · Petr Cvek

Remove duplicated function declaration for udc_enable() and udc_disable().

The patch title looks a bit tool long to me, and that also applied to your second one.

Moreover the correct prefix for this driver (for the title) is :
usb: gadget: pxa27x: MySuperSyntheticTitle

Cheers.

Signature · 1 line
Robert
author
#3 lore raw

PATCH 2/2 usb: gadget: Add test if argument pointer has a valid value in pxa27x_udc

In reply to a message not in the archive

Move call usb_put_phy(udc->transceiver) inside a valid pointer test.

Reported-by robert.jarzmik at free.fr
---
 drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/pxa27x_udc.c +3 -2
index 6fa675bf2c6f..9d2e1a8aa69d 100644
@@ -2531,9 +2531,10 @@ static int pxa_udc_remove(struct platform_device *_dev)
 	usb_del_gadget_udc(&udc->gadget);
 	pxa_cleanup_debugfs(udc);
 
-	if (!IS_ERR_OR_NULL(udc->transceiver))
+	if (!IS_ERR_OR_NULL(udc->transceiver)) {
 		usb_unregister_notifier(udc->transceiver, &pxa27x_udc_phy);
-	usb_put_phy(udc->transceiver);
+		usb_put_phy(udc->transceiver);
+	}
 
 	udc->transceiver = NULL;
 	the_controller = NULL;
Signature · 1 line
2.11.0