Patchwork [U-Boot,8/9] Issue connect/disconnect as appropriate

login
register
mail settings
Submitter Pantelis Antoniou
Date Nov. 28, 2012, 12:44 p.m.
Message ID <1354106642-4587-9-git-send-email-panto@antoniou-consulting.com>
Download mbox | patch
Permalink /patch/202244/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Marek Vasut - Nov. 28, 2012, 2:50 a.m.
Dear Pantelis Antoniou,

> Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind.
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
[...]

u-boot$ ./tools/checkpatch.pl \[PATCH\ 8_9\]\ Issue\ connect_disconnect\ as\ 
appropriate.mbox 
WARNING: line over 80 characters
#57: FILE: drivers/usb/gadget/g_dnl.c:88:
+       debug("%s: calling usb_gadget_disconnect for controller '%s'\n", 
shortname, gadget->name);

WARNING: line over 80 characters
#67: FILE: drivers/usb/gadget/g_dnl.c:160:
+       debug("%s: calling usb_gadget_connect for controller '%s'\n", shortname, 
gadget->name);

total: 0 errors, 2 warnings, 21 lines checked

NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX 
MULTISTATEMENT_MACRO_USE_DO_WHILE

[PATCH 8_9] Issue connect_disconnect as appropriate.mbox has style problems, 
please review.

If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

... fix the other patches too

Best regards,
Marek Vasut
Tom Rini - Nov. 28, 2012, 3:03 a.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/27/12 21:50, Marek Vasut wrote:
> Dear Pantelis Antoniou,
> 
>> Call usb_gadget_connect/usb_gadget_disconnect in
>> g_dnl_bind/g_dnl_unbind.
>> 
>> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> [...]
> 
> u-boot$ ./tools/checkpatch.pl \[PATCH\ 8_9\]\ Issue\
> connect_disconnect\ as\ appropriate.mbox WARNING: line over 80
> characters #57: FILE: drivers/usb/gadget/g_dnl.c:88: +
> debug("%s: calling usb_gadget_disconnect for controller '%s'\n", 
> shortname, gadget->name);
> 
> WARNING: line over 80 characters #67: FILE:
> drivers/usb/gadget/g_dnl.c:160: +       debug("%s: calling
> usb_gadget_connect for controller '%s'\n", shortname, 
> gadget->name);
> 
> total: 0 errors, 2 warnings, 21 lines checked
> 

Going over the limit is OK for prints to increase grepability.  Unless
splitting at the arguments would fix it.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQtX8HAAoJENk4IS6UOR1WddgQAIwTWvCvLrKCAwIuPNoWQrWv
SQd0Pp9cQqrEgIdNRq+qwDMO1drD40w/zZEpo21tPXtWIwHLgfEz2JAfEXRPJh0P
71hjKAQUq7Y4kkseu1Hx0qH1bmt1ILv6qZw3PHCuHGcD534kp2XegHXRnxvLho64
ucluUjcf5sYiCmp1Wfb7mRJe+qojQm6Njbx2RxyEb/5KyNuvlzYfb/Pu+QztrdYc
ku52fFf4DLBhgoYcRbUaVk9GqloeZkf6UkWbwEJQjfkxS6F32sH7Ye1/F260RBe4
jbDmmhTKNe+FTftO17N0KULdeML2nRxwDP7hv1BrE/M/WoMQvSmPavZ6X+JUJ3wb
pLrvRTrui3uohESiicVCsBjZyIMqd4rX58El9PzrXBIFdsvrJnfG1yopSzDLZ4Gu
/QCpkkUzG5FsPwA0bc5CCmaD9vAqp5Pv9VN59K9Q949hKasOv7qmPMRKqmBFAZDg
t0W7xTbh9tkOGA2oDDU6pmNAfptwIns/4FX0Gxko/3Di3BO+vW6HKqYIJND4FbEE
i3JOrMrDkT1Kse3PNevSxZ2HMb2N7ALe/HnECp4wLnorRKlyavhYfqHs+lklCJDV
gfaocfzxyFjzXnEpxGqlbBZpNyH65+YSZP7Y/8UCkgs1Sp9N9SzdGCobFDlmzJwa
Z8ZFbT1FWw0pf9kEfYM+
=XhQi
-----END PGP SIGNATURE-----
Pantelis Antoniou - Nov. 28, 2012, 12:44 p.m.
Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/usb/gadget/g_dnl.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index 7d87050..bbbfe02 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -83,7 +83,11 @@  static struct usb_gadget_strings *g_dnl_composite_strings[] = {
 
 static int g_dnl_unbind(struct usb_composite_dev *cdev)
 {
-	debug("%s\n", __func__);
+	struct usb_gadget *gadget = cdev->gadget;
+
+	debug("%s: calling usb_gadget_disconnect for controller '%s'\n", shortname, gadget->name);
+	usb_gadget_disconnect(gadget);
+
 	return 0;
 }
 
@@ -153,6 +157,9 @@  static int g_dnl_bind(struct usb_composite_dev *cdev)
 		device_desc.bcdDevice = __constant_cpu_to_le16(0x9999);
 	}
 
+	debug("%s: calling usb_gadget_connect for controller '%s'\n", shortname, gadget->name);
+	usb_gadget_connect(gadget);
+
 	return 0;
 
  error: