From d2871ff8531a0da3124c9201ceccb56e5cb38d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 8 Sep 2010 03:31:11 +0000 Subject: usb-s3c6400x.c : don't hardcode USB_NUM_ENDPOINTS but use the define git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28036 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/usb-s3c6400x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c index dbba9f39aa..23347ccf83 100644 --- a/firmware/target/arm/usb-s3c6400x.c +++ b/firmware/target/arm/usb-s3c6400x.c @@ -49,7 +49,7 @@ struct ep_type struct wakeup complete; } ; -static struct ep_type endpoints[5]; +static struct ep_type endpoints[USB_NUM_ENDPOINTS]; static struct usb_ctrlrequest ctrlreq USB_DEVBSS_ATTR; int usb_drv_port_speed(void) @@ -106,7 +106,7 @@ int usb_drv_request_endpoint(int type, int dir) if (dir == USB_DIR_IN) ep = 1; else ep = 2; - while (ep < 5) + while (ep < USB_NUM_ENDPOINTS) { if (!endpoints[ep].active) { @@ -219,7 +219,7 @@ void INT_USB_FUNC(void) } if (ints & 0x80000) /* OUT EP event */ - for (i = 0; i < 5; i += 2) + for (i = 0; i < USB_NUM_ENDPOINTS; i += 2) if ((epints = DOEPINT(i))) { if (epints & 1) /* Transfer completed */ -- cgit v1.2.3