Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / sound / sparc / cs4231.c
index 9a06c3b..8804f26 100644 (file)
@@ -8,6 +8,7 @@
  * Copyright (c) by Jaroslav Kysela <perex@suse.cz>
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -2001,9 +2002,10 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card,
        chip->c_dma.preallocate = sbus_dma_preallocate;
 
        if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt,
-                       IRQF_SHARED, "cs4231", chip)) {
-               snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n",
-                           dev, sdev->irqs[0]);
+                       SA_SHIRQ, "cs4231", chip)) {
+               snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %s\n",
+                          dev,
+                          __irq_itoa(sdev->irqs[0]));
                snd_cs4231_sbus_free(chip);
                return -EBUSY;
        }
@@ -2036,11 +2038,11 @@ static int __init cs4231_sbus_attach(struct sbus_dev *sdev)
        if (err)
                return err;
 
-       sprintf(card->longname, "%s at 0x%02lx:0x%016Lx, irq %d",
+       sprintf(card->longname, "%s at 0x%02lx:0x%08lx, irq %s",
                card->shortname,
                rp->flags & 0xffL,
-               (unsigned long long)rp->start,
-               sdev->irqs[0]);
+               rp->start,
+               __irq_itoa(sdev->irqs[0]));
 
        if ((err = snd_cs4231_sbus_create(card, sdev, dev, &cp)) < 0) {
                snd_card_free(card);
@@ -2242,10 +2244,10 @@ static int __init cs4231_ebus_attach(struct linux_ebus_device *edev)
        if (err)
                return err;
 
-       sprintf(card->longname, "%s at 0x%lx, irq %d",
+       sprintf(card->longname, "%s at 0x%lx, irq %s",
                card->shortname,
                edev->resource[0].start,
-               edev->irqs[0]);
+               __irq_itoa(edev->irqs[0]));
 
        if ((err = snd_cs4231_ebus_create(card, edev, dev, &chip)) < 0) {
                snd_card_free(card);
@@ -2283,14 +2285,15 @@ static int __init cs4231_init(void)
                for_each_ebusdev(edev, ebus) {
                        int match = 0;
 
-                       if (!strcmp(edev->prom_node->name, "SUNW,CS4231")) {
+                       if (!strcmp(edev->prom_name, "SUNW,CS4231")) {
                                match = 1;
-                       } else if (!strcmp(edev->prom_node->name, "audio")) {
-                               char *compat;
+                       } else if (!strcmp(edev->prom_name, "audio")) {
+                               char compat[16];
 
-                               compat = of_get_property(edev->prom_node,
-                                                        "compatible", NULL);
-                               if (compat && !strcmp(compat, "SUNW,CS4231"))
+                               prom_getstring(edev->prom_node, "compatible",
+                                              compat, sizeof(compat));
+                               compat[15] = '\0';
+                               if (!strcmp(compat, "SUNW,CS4231"))
                                        match = 1;
                        }