Browse Source

usb: musb: Use ARRAY_SIZE at appropriate places

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Axel Lin 12 years ago
parent
commit
e31dc61e7d
2 changed files with 2 additions and 4 deletions
  1. 1 2
      drivers/usb/musb/musb_hcd.c
  2. 1 2
      drivers/usb/musb/musb_udc.c

+ 1 - 2
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();
 
 	/*

+ 1 - 2
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 "