[PATCH] chardev: GPIO for SCx200 & PC-8736x: dispatch via vtable
[firefly-linux-kernel-4.4.55.git] / drivers / char / rtc.c
index 7cac6d05d72353da0c69c883d1806e59cc50aa8e..0897b0c8d528b3931e0a4db2eb2a49649fd60eec 100644 (file)
@@ -928,7 +928,7 @@ static int __init rtc_init(void)
 #ifdef __sparc__
        for_each_ebus(ebus) {
                for_each_ebusdev(edev, ebus) {
-                       if(strcmp(edev->prom_name, "rtc") == 0) {
+                       if(strcmp(edev->prom_node->name, "rtc") == 0) {
                                rtc_port = edev->resource[0].start;
                                rtc_irq = edev->irqs[0];
                                goto found;
@@ -938,7 +938,7 @@ static int __init rtc_init(void)
 #ifdef __sparc_v9__
        for_each_isa(isa_br) {
                for_each_isadev(isa_dev, isa_br) {
-                       if (strcmp(isa_dev->prom_name, "rtc") == 0) {
+                       if (strcmp(isa_dev->prom_node->name, "rtc") == 0) {
                                rtc_port = isa_dev->resource.start;
                                rtc_irq = isa_dev->irq;
                                goto found;
@@ -960,10 +960,6 @@ found:
         * PCI Slot 2 INTA# (and some INTx# in Slot 1).
         */
        if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) {
-               /*
-                * Standard way for sparc to print irq's is to use
-                * __irq_itoa(). I think for EBus it's ok to use %d.
-                */
                printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq);
                return -EIO;
        }