Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[pandora-kernel.git] / arch / sparc / kernel / time_32.c
index 4211bfc..4e23639 100644 (file)
@@ -137,7 +137,7 @@ static struct platform_device m48t59_rtc = {
        },
 };
 
-static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit clock_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
        const char *model = of_get_property(dp, "model", NULL);
@@ -145,6 +145,10 @@ static int __devinit clock_probe(struct platform_device *op, const struct of_dev
        if (!model)
                return -ENODEV;
 
+       /* Only the primary RTC has an address property */
+       if (!of_find_property(dp, "address", NULL))
+               return -ENODEV;
+
        m48t59_rtc.resource = &op->resource[0];
        if (!strcmp(model, "mk48t02")) {
                /* Map the clock register io area read-only */
@@ -171,7 +175,7 @@ static struct of_device_id __initdata clock_match[] = {
        {},
 };
 
-static struct of_platform_driver clock_driver = {
+static struct platform_driver clock_driver = {
        .probe          = clock_probe,
        .driver = {
                .name = "rtc",
@@ -184,7 +188,7 @@ static struct of_platform_driver clock_driver = {
 /* Probe for the mostek real time clock chip. */
 static int __init clock_init(void)
 {
-       return of_register_platform_driver(&clock_driver);
+       return platform_driver_register(&clock_driver);
 }
 /* Must be after subsys_initcall() so that busses are probed.  Must
  * be before device_initcall() because things like the RTC driver
@@ -219,7 +223,7 @@ static void __init sbus_time_init(void)
 
        btfixup();
 
-       sparc_init_timers(timer_interrupt);
+       sparc_irq_config.init_timers(timer_interrupt);
 }
 
 void __init time_init(void)