diff options
author | Andi Drebes <lists-receive@programmierforen.de> | 2007-07-09 17:17:57 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-07-09 17:17:57 -0400 |
commit | ecea57309e826c8aed020e4dae92b368f2eda2a5 (patch) | |
tree | 36b9bcaad34e0865aedbc4f44ae3536891b91a26 /drivers/ide | |
parent | f50f9d8867b95925078ba0fa450e3a5736629d28 (diff) |
drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE
This patch replaces an array size calculation in drivers/ide/legacy/hd.c
that was done using sizeof with the ARRAY_SIZE macro.
Tested by compilation on an i386 box using "allyesconfig".
Diffed against Linus' git-tree.
Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/legacy/hd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index 45ed03591cd8..661c12f6dda6 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c | |||
@@ -130,7 +130,7 @@ struct hd_i_struct { | |||
130 | 130 | ||
131 | #ifdef HD_TYPE | 131 | #ifdef HD_TYPE |
132 | static struct hd_i_struct hd_info[] = { HD_TYPE }; | 132 | static struct hd_i_struct hd_info[] = { HD_TYPE }; |
133 | static int NR_HD = ((sizeof (hd_info))/(sizeof (struct hd_i_struct))); | 133 | static int NR_HD = ARRAY_SIZE(hd_info); |
134 | #else | 134 | #else |
135 | static struct hd_i_struct hd_info[MAX_HD]; | 135 | static struct hd_i_struct hd_info[MAX_HD]; |
136 | static int NR_HD; | 136 | static int NR_HD; |