usb: gadget: pxa27x: Remove duplicate function prototype
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/2 usb: gadget: pxa27x: Remove duplicate function prototype
Functions udc_enable() and udc_disable() have a duplicated prototype. Remove it.
--- drivers/usb/gadget/udc/pxa27x_udc.c | 3 --- 1 file changed, 3 deletions(-)
drivers/usb/gadget/udc/pxa27x_udc.c +0 -3
@@ -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
Robert Jarzmik
maintainerPATCH v2 1/2 usb: gadget: pxa27x: Remove duplicate function prototype
Quoted 4 lines · Petr Cvek
Functions
udc_enable()andudc_disable()have a duplicated prototype. Remove it.Signed-off-by Petr Cvek <[email protected]>
Cheers.
Signature · 1 line
Robert
PATCH v2 2/2 usb: gadget: pxa27x: Test for a valid argument pointer
In reply to a message not in the archiveA call usb_put_phy(udc->transceiver) must be tested for a valid pointer. Use an already existing test for usb_unregister_notifier call.
--- drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/usb/gadget/udc/pxa27x_udc.c +3 -2
@@ -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
Robert Jarzmik
maintainerPATCH v2 2/2 usb: gadget: pxa27x: Test for a valid argument pointer
Quoted 5 lines · Petr Cvek
A call
usb_put_phy(udc->transceiver)must be tested for a valid pointer. Use an already existing test forusb_unregister_notifiercall.Reported-by Robert Jarzmik <[email protected]>Signed-off-by Petr Cvek <[email protected]>
Cheers.
Signature · 1 line
Robert