aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/ppc/pmac.c')
-rw-r--r--sound/ppc/pmac.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 90db9a1d1e0a..641430631505 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -1120,6 +1120,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1120 struct snd_pmac *chip; 1120 struct snd_pmac *chip;
1121 struct device_node *np; 1121 struct device_node *np;
1122 int i, err; 1122 int i, err;
1123 unsigned int irq;
1123 unsigned long ctrl_addr, txdma_addr, rxdma_addr; 1124 unsigned long ctrl_addr, txdma_addr, rxdma_addr;
1124 static struct snd_device_ops ops = { 1125 static struct snd_device_ops ops = {
1125 .dev_free = snd_pmac_dev_free, 1126 .dev_free = snd_pmac_dev_free,
@@ -1153,10 +1154,6 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1153 if (chip->is_k2) { 1154 if (chip->is_k2) {
1154 static char *rnames[] = { 1155 static char *rnames[] = {
1155 "Sound Control", "Sound DMA" }; 1156 "Sound Control", "Sound DMA" };
1156 if (np->n_intrs < 3) {
1157 err = -ENODEV;
1158 goto __error;
1159 }
1160 for (i = 0; i < 2; i ++) { 1157 for (i = 0; i < 2; i ++) {
1161 if (of_address_to_resource(np->parent, i, 1158 if (of_address_to_resource(np->parent, i,
1162 &chip->rsrc[i])) { 1159 &chip->rsrc[i])) {
@@ -1185,10 +1182,6 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1185 } else { 1182 } else {
1186 static char *rnames[] = { 1183 static char *rnames[] = {
1187 "Sound Control", "Sound Tx DMA", "Sound Rx DMA" }; 1184 "Sound Control", "Sound Tx DMA", "Sound Rx DMA" };
1188 if (np->n_intrs < 3) {
1189 err = -ENODEV;
1190 goto __error;
1191 }
1192 for (i = 0; i < 3; i ++) { 1185 for (i = 0; i < 3; i ++) {
1193 if (of_address_to_resource(np, i, 1186 if (of_address_to_resource(np, i,
1194 &chip->rsrc[i])) { 1187 &chip->rsrc[i])) {
@@ -1220,28 +1213,30 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1220 chip->playback.dma = ioremap(txdma_addr, 0x100); 1213 chip->playback.dma = ioremap(txdma_addr, 0x100);
1221 chip->capture.dma = ioremap(rxdma_addr, 0x100); 1214 chip->capture.dma = ioremap(rxdma_addr, 0x100);
1222 if (chip->model <= PMAC_BURGUNDY) { 1215 if (chip->model <= PMAC_BURGUNDY) {
1223 if (request_irq(np->intrs[0].line, snd_pmac_ctrl_intr, 0, 1216 irq = irq_of_parse_and_map(np, 0);
1217 if (request_irq(irq, snd_pmac_ctrl_intr, 0,
1224 "PMac", (void*)chip)) { 1218 "PMac", (void*)chip)) {
1225 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[0].line); 1219 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n",
1220 irq);
1226 err = -EBUSY; 1221 err = -EBUSY;
1227 goto __error; 1222 goto __error;
1228 } 1223 }
1229 chip->irq = np->intrs[0].line; 1224 chip->irq = irq;
1230 } 1225 }
1231 if (request_irq(np->intrs[1].line, snd_pmac_tx_intr, 0, 1226 irq = irq_of_parse_and_map(np, 1);
1232 "PMac Output", (void*)chip)) { 1227 if (request_irq(irq, snd_pmac_tx_intr, 0, "PMac Output", (void*)chip)){
1233 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[1].line); 1228 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", irq);
1234 err = -EBUSY; 1229 err = -EBUSY;
1235 goto __error; 1230 goto __error;
1236 } 1231 }
1237 chip->tx_irq = np->intrs[1].line; 1232 chip->tx_irq = irq;
1238 if (request_irq(np->intrs[2].line, snd_pmac_rx_intr, 0, 1233 irq = irq_of_parse_and_map(np, 2);
1239 "PMac Input", (void*)chip)) { 1234 if (request_irq(irq, snd_pmac_rx_intr, 0, "PMac Input", (void*)chip)) {
1240 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", np->intrs[2].line); 1235 snd_printk(KERN_ERR "pmac: unable to grab IRQ %d\n", irq);
1241 err = -EBUSY; 1236 err = -EBUSY;
1242 goto __error; 1237 goto __error;
1243 } 1238 }
1244 chip->rx_irq = np->intrs[2].line; 1239 chip->rx_irq = irq;
1245 1240
1246 snd_pmac_sound_feature(chip, 1); 1241 snd_pmac_sound_feature(chip, 1);
1247 1242