summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-06-23 00:57:46 +0800
committerTom Rini <trini@ti.com>2013-06-26 10:26:06 -0400
commite31dc61e7dc89ce900426828c936208a6638cf8c (patch)
tree9b23230243dc6b6631b7eb905e032fbf71615841 /drivers/usb
parent31bf0f57b2c322500ceccdc6a38b4a8edb7035f0 (diff)
downloadu-boot-imx-e31dc61e7dc89ce900426828c936208a6638cf8c.zip
u-boot-imx-e31dc61e7dc89ce900426828c936208a6638cf8c.tar.gz
u-boot-imx-e31dc61e7dc89ce900426828c936208a6638cf8c.tar.bz2
usb: musb: Use ARRAY_SIZE at appropriate places
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_hcd.c3
-rw-r--r--drivers/usb/musb/musb_udc.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 60e03a4..7bb91e5 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -1105,8 +1105,7 @@ int usb_lowlevel_init(int index, void **controller)
/* Configure all the endpoint FIFO's and start usb controller */
musbr = musb_cfg.regs;
- musb_configure_ep(&epinfo[0],
- sizeof(epinfo) / sizeof(struct musb_epinfo));
+ musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo));
musb_start();
/*
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index e0b4217..e8a2ce0 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -894,8 +894,7 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id,
epinfo[id * 2].epsize = endpoint->rcv_packetSize;
}
- musb_configure_ep(&epinfo[0],
- sizeof(epinfo) / sizeof(struct musb_epinfo));
+ musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo));
} else {
if (debug_level > 0)
serial_printf("ERROR : %s endpoint request %d "