Re: [PATCH] vr41xx: ARRAY_SIZE cleanup

From: Jean Delvare
Date: Sat Jan 07 2006 - 17:13:18 EST


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

Oops, I just realized (two minutes too late, of course) that you
already have a similar, but different, fix for this driver (as part of
drivers-char-use-array_size-macro.patch). So, please consider this new
patch instead, which should apply properly on top of your current
stack. Thanks, and sorry for the noise.

Content-Disposition: inline; filename=vr41xx-rtc-num-resources-cleanup.patch

No need to define RTC_NUM_RESOURCES, it doesn't add any value to the
code.

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

--- linux-2.6.15-mm2.orig/drivers/char/vr41xx_rtc.c 2006-01-07 23:00:54.000000000 +0100
+++ linux-2.6.15-mm2/drivers/char/vr41xx_rtc.c 2006-01-07 23:08:28.000000000 +0100
@@ -127,8 +127,6 @@
.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;
@@ -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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/