From: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Date: Fri, 13 Aug 2010 13:02:41 +0000 (+0400)
Subject: USB-CDC: change simple_strtol to simple_strtoul
X-Git-Tag: v2025.01-rc5-pxa1908~20078^2~27^2^2~3
X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=c0ef51318813c062052f91ef7c15b75bbbf15767;p=u-boot.git

USB-CDC: change simple_strtol to simple_strtoul

The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c
(done by Julia Lawall <julia@diku.dk>) from linux-2.6.git.

Since num is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
---

diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index c7fad3992e..e11cc204b7 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -156,7 +156,7 @@ ep_matches (
 
 	/* report address */
 	if (isdigit (ep->name [2])) {
-		u8	num = simple_strtol (&ep->name [2], NULL, 10);
+		u8	num = simple_strtoul (&ep->name [2], NULL, 10);
 		desc->bEndpointAddress |= num;
 #ifdef	MANY_ENDPOINTS
 	} else if (desc->bEndpointAddress & USB_DIR_IN) {