]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/chrp/time.c
[POWERPC] Revert chrp_pci_fixup_vt8231_ata devinit to fix libata on pegasos
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / chrp / time.c
index 7d7889026936a2eee1366b4ba7e6cc6b9e35923c..96d1e4b3c493f8628049891f8f54d1813e8cadaa 100644 (file)
@@ -39,12 +39,17 @@ long __init chrp_time_init(void)
        struct resource r;
        int base;
 
-       rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
+       rtcs = of_find_compatible_node(NULL, "rtc", "pnpPNP,b00");
        if (rtcs == NULL)
-               rtcs = find_compatible_devices("rtc", "ds1385-rtc");
-       if (rtcs == NULL || of_address_to_resource(rtcs, 0, &r))
+               rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc");
+       if (rtcs == NULL)
+               return 0;
+       if (of_address_to_resource(rtcs, 0, &r)) {
+               of_node_put(rtcs);
                return 0;
-       
+       }
+       of_node_put(rtcs);
+
        base = r.start;
        nvram_as1 = 0;
        nvram_as0 = base;