Re: Enable RTC for Ebony and Walnut
From: Stephen Rothwell <hidden>
Date: 2007-12-21 05:16:14
Attachments
- (unnamed) [application/pgp-signature] 189 bytes
From: Stephen Rothwell <hidden>
Date: 2007-12-21 05:16:14
On Fri, 21 Dec 2007 13:21:30 +1100 David Gibson [off-list ref] wrote:
+++ working-2.6/arch/powerpc/sysdev/of_rtc.c 2007-12-21 13:11:34.000000000 +1100 +#include <asm/of_platform.h>
Use linux/of_platform.h, please.
+
+static struct {const or __initdata
+ char *compatible;
const
+ char *plat_name;
const (ok, no, thanks to platform_device_register_simple()).
+} of_rtc_table[] = {
+ { "ds1743-nvram", "rtc-ds1742" },
+};
+
+void __init of_instantiate_rtc(void)
+{
+ struct device_node *node;
+ int err;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(of_rtc_table); i++) {
+ char *compatible = of_rtc_table[i].compatible;const (or maybe just use of_rtc_table[i].compatible directly in the one place it is used). -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/