Skip to content

Commit

Permalink
[PATCH] vr41xx: ARRAY_SIZE cleanup
Browse files Browse the repository at this point in the history
No need to define RTC_NUM_RESOURCES, it doesn't add any value to the code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jean Delvare authored and Linus Torvalds committed Jan 10, 2006
1 parent fe97107 commit 1d64ec1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/char/vr41xx_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ struct resource rtc_resource[2] = {
.flags = IORESOURCE_MEM, },
};

#define RTC_NUM_RESOURCES ARRAY_SIZE(rtc_resource)

static inline unsigned long read_elapsed_second(void)
{
unsigned long first_low, first_mid, first_high;
Expand Down Expand Up @@ -686,7 +684,8 @@ static int __devinit vr41xx_rtc_init(void)
break;
}

rtc_platform_device = platform_device_register_simple("RTC", -1, rtc_resource, RTC_NUM_RESOURCES);
rtc_platform_device = platform_device_register_simple("RTC", -1,
rtc_resource, ARRAY_SIZE(rtc_resource));
if (IS_ERR(rtc_platform_device))
return PTR_ERR(rtc_platform_device);

Expand Down

0 comments on commit 1d64ec1

Please sign in to comment.