summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@nuerscht.ch>2005-12-11 16:20:08 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 13:51:43 -0800
commit52950ed40dc97456209979af1d8f51b63cf6dcab (patch)
tree527fb1a339889b3df9d227b1c17f87bc487f397f /drivers/usb/storage
parentf3d34ed48c80903544b509031fee64838d29f35f (diff)
downloadlinux-52950ed40dc97456209979af1d8f51b63cf6dcab.tar.gz
linux-52950ed40dc97456209979af1d8f51b63cf6dcab.tar.bz2
linux-52950ed40dc97456209979af1d8f51b63cf6dcab.zip
[PATCH] USB: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed. Patch is compile-tested on i386. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/sddr09.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index b8e7802c871d..fb8bacaae27c 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -133,13 +133,11 @@ static struct nand_flash_dev nand_flash_ids[] = {
{ 0,}
};
-#define SIZE(a) (sizeof(a)/sizeof((a)[0]))
-
static struct nand_flash_dev *
nand_find_id(unsigned char id) {
int i;
- for (i = 0; i < SIZE(nand_flash_ids); i++)
+ for (i = 0; i < ARRAY_SIZE(nand_flash_ids); i++)
if (nand_flash_ids[i].model_id == id)
return &(nand_flash_ids[i]);
return NULL;