[PATCH] vr41xx: ARRAY_SIZE cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

Can you please pick this patch for -mm? I sent it to Yoichi Yuasa one
month ago but didn't get any answer. Thanks.

Content-Disposition: inline; filename=vr41xx-array-size-cleanup.patch

Possible ARRAY_SIZE cleanup for the vr41xx_rtc driver.

Signed-off-by: Jean Delvare <[email protected]>
---
 drivers/char/vr41xx_rtc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- linux-2.6.15-rc2.orig/drivers/char/vr41xx_rtc.c	2005-11-13 21:02:32.000000000 +0100
+++ linux-2.6.15-rc2/drivers/char/vr41xx_rtc.c	2005-12-05 22:25:48.000000000 +0100
@@ -127,8 +127,6 @@
 		.flags	= IORESOURCE_MEM,	},
 };
 
-#define RTC_NUM_RESOURCES	sizeof(rtc_resource) / sizeof(struct resource)
-
 static inline unsigned long read_elapsed_second(void)
 {
 	unsigned long first_low, first_mid, first_high;
@@ -686,7 +684,8 @@
 		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);
 


-- 
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux