public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] usb: musb: Use ARRAY_SIZE at appropriate places
Date: Sun, 23 Jun 2013 00:57:46 +0800	[thread overview]
Message-ID: <1371920266.31971.6.camel@phoenix> (raw)
In-Reply-To: <1371920114.31971.3.camel@phoenix>

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/usb/musb/musb_hcd.c | 3 +--
 drivers/usb/musb/musb_udc.c | 3 +--
 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 "
-- 
1.8.1.2

  parent reply	other threads:[~2013-06-22 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 16:55 [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Axel Lin
2013-06-22 16:56 ` [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places Axel Lin
2013-06-22 16:57 ` Axel Lin [this message]
2013-06-26 20:25 ` [U-Boot] [U-Boot, 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371920266.31971.6.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox