ALSA: remove direct access of dev->bus_id in sound/isa/*

Removed the direct accesses of dev->bus_id in sound/isa/* by replacement
with dev_err() or dev_warn() functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+34 -45
+3 -3
sound/isa/ad1848/ad1848.c
··· 70 return 0; 71 72 if (port[n] == SNDRV_AUTO_PORT) { 73 - snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id); 74 return 0; 75 } 76 if (irq[n] == SNDRV_AUTO_IRQ) { 77 - snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id); 78 return 0; 79 } 80 if (dma1[n] == SNDRV_AUTO_DMA) { 81 - snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id); 82 return 0; 83 } 84 return 1;
··· 70 return 0; 71 72 if (port[n] == SNDRV_AUTO_PORT) { 73 + dev_err(dev, "please specify port\n"); 74 return 0; 75 } 76 if (irq[n] == SNDRV_AUTO_IRQ) { 77 + dev_err(dev, "please specify irq\n"); 78 return 0; 79 } 80 if (dma1[n] == SNDRV_AUTO_DMA) { 81 + dev_err(dev, "please specify dma1\n"); 82 return 0; 83 } 84 return 1;
+6 -6
sound/isa/adlib.c
··· 36 return 0; 37 38 if (port[n] == SNDRV_AUTO_PORT) { 39 - snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id); 40 return 0; 41 } 42 return 1; ··· 55 56 card = snd_card_new(index[n], id[n], THIS_MODULE, 0); 57 if (!card) { 58 - snd_printk(KERN_ERR "%s: could not create card\n", dev->bus_id); 59 return -EINVAL; 60 } 61 62 card->private_data = request_region(port[n], 4, CRD_NAME); 63 if (!card->private_data) { 64 - snd_printk(KERN_ERR "%s: could not grab ports\n", dev->bus_id); 65 error = -EBUSY; 66 goto out; 67 } ··· 73 74 error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3); 75 if (error < 0) { 76 - snd_printk(KERN_ERR "%s: could not create OPL\n", dev->bus_id); 77 goto out; 78 } 79 80 error = snd_opl3_hwdep_new(opl3, 0, 0, NULL); 81 if (error < 0) { 82 - snd_printk(KERN_ERR "%s: could not create FM\n", dev->bus_id); 83 goto out; 84 } 85 ··· 87 88 error = snd_card_register(card); 89 if (error < 0) { 90 - snd_printk(KERN_ERR "%s: could not register card\n", dev->bus_id); 91 goto out; 92 } 93
··· 36 return 0; 37 38 if (port[n] == SNDRV_AUTO_PORT) { 39 + dev_err(dev, "please specify port\n"); 40 return 0; 41 } 42 return 1; ··· 55 56 card = snd_card_new(index[n], id[n], THIS_MODULE, 0); 57 if (!card) { 58 + dev_err(dev, "could not create card\n"); 59 return -EINVAL; 60 } 61 62 card->private_data = request_region(port[n], 4, CRD_NAME); 63 if (!card->private_data) { 64 + dev_err(dev, "could not grab ports\n"); 65 error = -EBUSY; 66 goto out; 67 } ··· 73 74 error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3); 75 if (error < 0) { 76 + dev_err(dev, "could not create OPL\n"); 77 goto out; 78 } 79 80 error = snd_opl3_hwdep_new(opl3, 0, 0, NULL); 81 if (error < 0) { 82 + dev_err(dev, "could not create FM\n"); 83 goto out; 84 } 85 ··· 87 88 error = snd_card_register(card); 89 if (error < 0) { 90 + dev_err(dev, "could not register card\n"); 91 goto out; 92 } 93
+4 -4
sound/isa/cs423x/cs4231.c
··· 74 return 0; 75 76 if (port[n] == SNDRV_AUTO_PORT) { 77 - snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id); 78 return 0; 79 } 80 if (irq[n] == SNDRV_AUTO_IRQ) { 81 - snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id); 82 return 0; 83 } 84 if (dma1[n] == SNDRV_AUTO_DMA) { 85 - snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id); 86 return 0; 87 } 88 return 1; ··· 133 mpu_port[n], 0, mpu_irq[n], 134 mpu_irq[n] >= 0 ? IRQF_DISABLED : 0, 135 NULL) < 0) 136 - printk(KERN_WARNING "%s: MPU401 not detected\n", dev->bus_id); 137 } 138 139 snd_card_set_dev(card, dev);
··· 74 return 0; 75 76 if (port[n] == SNDRV_AUTO_PORT) { 77 + dev_err(dev, "please specify port\n"); 78 return 0; 79 } 80 if (irq[n] == SNDRV_AUTO_IRQ) { 81 + dev_err(dev, "please specify irq\n"); 82 return 0; 83 } 84 if (dma1[n] == SNDRV_AUTO_DMA) { 85 + dev_err(dev, "please specify dma1\n"); 86 return 0; 87 } 88 return 1; ··· 133 mpu_port[n], 0, mpu_irq[n], 134 mpu_irq[n] >= 0 ? IRQF_DISABLED : 0, 135 NULL) < 0) 136 + dev_warn(dev, "MPU401 not detected\n"); 137 } 138 139 snd_card_set_dev(card, dev);
+4 -4
sound/isa/cs423x/cs4236.c
··· 488 return 0; 489 490 if (port[dev] == SNDRV_AUTO_PORT) { 491 - snd_printk(KERN_ERR "%s: please specify port\n", pdev->bus_id); 492 return 0; 493 } 494 if (cport[dev] == SNDRV_AUTO_PORT) { 495 - snd_printk(KERN_ERR "%s: please specify cport\n", pdev->bus_id); 496 return 0; 497 } 498 if (irq[dev] == SNDRV_AUTO_IRQ) { 499 - snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id); 500 return 0; 501 } 502 if (dma1[dev] == SNDRV_AUTO_DMA) { 503 - snd_printk(KERN_ERR "%s: please specify dma1\n", pdev->bus_id); 504 return 0; 505 } 506 return 1;
··· 488 return 0; 489 490 if (port[dev] == SNDRV_AUTO_PORT) { 491 + dev_err(pdev, "please specify port\n"); 492 return 0; 493 } 494 if (cport[dev] == SNDRV_AUTO_PORT) { 495 + dev_err(pdev, "please specify cport\n"); 496 return 0; 497 } 498 if (irq[dev] == SNDRV_AUTO_IRQ) { 499 + dev_err(pdev, "please specify irq\n"); 500 return 0; 501 } 502 if (dma1[dev] == SNDRV_AUTO_DMA) { 503 + dev_err(pdev, "please specify dma1\n"); 504 return 0; 505 } 506 return 1;
+3 -6
sound/isa/es1688/es1688.c
··· 88 if (irq[n] == SNDRV_AUTO_IRQ) { 89 irq[n] = snd_legacy_find_free_irq(possible_irqs); 90 if (irq[n] < 0) { 91 - snd_printk(KERN_ERR "%s: unable to find a free IRQ\n", 92 - dev->bus_id); 93 return -EBUSY; 94 } 95 } 96 if (dma8[n] == SNDRV_AUTO_DMA) { 97 dma8[n] = snd_legacy_find_free_dma(possible_dmas); 98 if (dma8[n] < 0) { 99 - snd_printk(KERN_ERR "%s: unable to find a free DMA\n", 100 - dev->bus_id); 101 return -EBUSY; 102 } 103 } ··· 145 146 if (snd_opl3_create(card, chip->port, chip->port + 2, 147 OPL3_HW_OPL3, 0, &opl3) < 0) 148 - printk(KERN_WARNING "%s: opl3 not detected at 0x%lx\n", 149 - dev->bus_id, chip->port); 150 else { 151 error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 152 if (error < 0)
··· 88 if (irq[n] == SNDRV_AUTO_IRQ) { 89 irq[n] = snd_legacy_find_free_irq(possible_irqs); 90 if (irq[n] < 0) { 91 + dev_err(dev, "unable to find a free IRQ\n"); 92 return -EBUSY; 93 } 94 } 95 if (dma8[n] == SNDRV_AUTO_DMA) { 96 dma8[n] = snd_legacy_find_free_dma(possible_dmas); 97 if (dma8[n] < 0) { 98 + dev_err(dev, "unable to find a free DMA\n"); 99 return -EBUSY; 100 } 101 } ··· 147 148 if (snd_opl3_create(card, chip->port, chip->port + 2, 149 OPL3_HW_OPL3, 0, &opl3) < 0) 150 + dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port); 151 else { 152 error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); 153 if (error < 0)
+5 -8
sound/isa/gus/gusclassic.c
··· 90 if (irq[n] == SNDRV_AUTO_IRQ) { 91 irq[n] = snd_legacy_find_free_irq(possible_irqs); 92 if (irq[n] < 0) { 93 - snd_printk(KERN_ERR "%s: unable to find a free IRQ\n", 94 - dev->bus_id); 95 return -EBUSY; 96 } 97 } 98 if (dma1[n] == SNDRV_AUTO_DMA) { 99 dma1[n] = snd_legacy_find_free_dma(possible_dmas); 100 if (dma1[n] < 0) { 101 - snd_printk(KERN_ERR "%s: unable to find a free DMA1\n", 102 - dev->bus_id); 103 return -EBUSY; 104 } 105 } 106 if (dma2[n] == SNDRV_AUTO_DMA) { 107 dma2[n] = snd_legacy_find_free_dma(possible_dmas); 108 if (dma2[n] < 0) { 109 - snd_printk(KERN_ERR "%s: unable to find a free DMA2\n", 110 - dev->bus_id); 111 return -EBUSY; 112 } 113 } ··· 171 172 error = -ENODEV; 173 if (gus->max_flag || gus->ess_flag) { 174 - snd_printk(KERN_ERR "%s: GUS Classic or ACE soundcard was " 175 - "not detected at 0x%lx\n", dev->bus_id, gus->gf1.port); 176 goto out; 177 } 178
··· 90 if (irq[n] == SNDRV_AUTO_IRQ) { 91 irq[n] = snd_legacy_find_free_irq(possible_irqs); 92 if (irq[n] < 0) { 93 + dev_err(dev, "unable to find a free IRQ\n"); 94 return -EBUSY; 95 } 96 } 97 if (dma1[n] == SNDRV_AUTO_DMA) { 98 dma1[n] = snd_legacy_find_free_dma(possible_dmas); 99 if (dma1[n] < 0) { 100 + dev_err(dev, "unable to find a free DMA1\n"); 101 return -EBUSY; 102 } 103 } 104 if (dma2[n] == SNDRV_AUTO_DMA) { 105 dma2[n] = snd_legacy_find_free_dma(possible_dmas); 106 if (dma2[n] < 0) { 107 + dev_err(dev, "unable to find a free DMA2\n"); 108 return -EBUSY; 109 } 110 } ··· 174 175 error = -ENODEV; 176 if (gus->max_flag || gus->ess_flag) { 177 + dev_err(dev, "GUS Classic or ACE soundcard was " 178 + "not detected at 0x%lx\n", gus->gf1.port); 179 goto out; 180 } 181
+7 -12
sound/isa/gus/gusextreme.c
··· 106 if (irq[n] == SNDRV_AUTO_IRQ) { 107 irq[n] = snd_legacy_find_free_irq(possible_irqs); 108 if (irq[n] < 0) { 109 - snd_printk(KERN_ERR "%s: unable to find a free IRQ " 110 - "for ES1688\n", dev->bus_id); 111 return -EBUSY; 112 } 113 } 114 if (dma8[n] == SNDRV_AUTO_DMA) { 115 dma8[n] = snd_legacy_find_free_dma(possible_dmas); 116 if (dma8[n] < 0) { 117 - snd_printk(KERN_ERR "%s: unable to find a free DMA " 118 - "for ES1688\n", dev->bus_id); 119 return -EBUSY; 120 } 121 } ··· 141 if (gf1_irq[n] == SNDRV_AUTO_IRQ) { 142 gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs); 143 if (gf1_irq[n] < 0) { 144 - snd_printk(KERN_ERR "%s: unable to find a free IRQ " 145 - "for GF1\n", dev->bus_id); 146 return -EBUSY; 147 } 148 } 149 if (dma1[n] == SNDRV_AUTO_DMA) { 150 dma1[n] = snd_legacy_find_free_dma(possible_dmas); 151 if (dma1[n] < 0) { 152 - snd_printk(KERN_ERR "%s: unable to find a free DMA " 153 - "for GF1\n", dev->bus_id); 154 return -EBUSY; 155 } 156 } ··· 274 275 error = -ENODEV; 276 if (!gus->ess_flag) { 277 - snd_printk(KERN_ERR "%s: GUS Extreme soundcard was not " 278 - "detected at 0x%lx\n", dev->bus_id, gus->gf1.port); 279 goto out; 280 } 281 gus->codec_flag = 1; ··· 306 307 if (snd_opl3_create(card, es1688->port, es1688->port + 2, 308 OPL3_HW_OPL3, 0, &opl3) < 0) 309 - printk(KERN_ERR "%s: opl3 not detected at 0x%lx\n", 310 - dev->bus_id, es1688->port); 311 else { 312 error = snd_opl3_hwdep_new(opl3, 0, 2, NULL); 313 if (error < 0)
··· 106 if (irq[n] == SNDRV_AUTO_IRQ) { 107 irq[n] = snd_legacy_find_free_irq(possible_irqs); 108 if (irq[n] < 0) { 109 + dev_err(dev, "unable to find a free IRQ for ES1688\n"); 110 return -EBUSY; 111 } 112 } 113 if (dma8[n] == SNDRV_AUTO_DMA) { 114 dma8[n] = snd_legacy_find_free_dma(possible_dmas); 115 if (dma8[n] < 0) { 116 + dev_err(dev, "unable to find a free DMA for ES1688\n"); 117 return -EBUSY; 118 } 119 } ··· 143 if (gf1_irq[n] == SNDRV_AUTO_IRQ) { 144 gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs); 145 if (gf1_irq[n] < 0) { 146 + dev_err(dev, "unable to find a free IRQ for GF1\n"); 147 return -EBUSY; 148 } 149 } 150 if (dma1[n] == SNDRV_AUTO_DMA) { 151 dma1[n] = snd_legacy_find_free_dma(possible_dmas); 152 if (dma1[n] < 0) { 153 + dev_err(dev, "unable to find a free DMA for GF1\n"); 154 return -EBUSY; 155 } 156 } ··· 278 279 error = -ENODEV; 280 if (!gus->ess_flag) { 281 + dev_err(dev, "GUS Extreme soundcard was not " 282 + "detected at 0x%lx\n", gus->gf1.port); 283 goto out; 284 } 285 gus->codec_flag = 1; ··· 310 311 if (snd_opl3_create(card, es1688->port, es1688->port + 2, 312 OPL3_HW_OPL3, 0, &opl3) < 0) 313 + dev_warn(dev, "opl3 not detected at 0x%lx\n", es1688->port); 314 else { 315 error = snd_opl3_hwdep_new(opl3, 0, 2, NULL); 316 if (error < 0)
+2 -2
sound/isa/sb/sb8.c
··· 85 if (!enable[dev]) 86 return 0; 87 if (irq[dev] == SNDRV_AUTO_IRQ) { 88 - snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id); 89 return 0; 90 } 91 if (dma8[dev] == SNDRV_AUTO_DMA) { 92 - snd_printk(KERN_ERR "%s: please specify dma8\n", pdev->bus_id); 93 return 0; 94 } 95 return 1;
··· 85 if (!enable[dev]) 86 return 0; 87 if (irq[dev] == SNDRV_AUTO_IRQ) { 88 + dev_err(pdev, "please specify irq\n"); 89 return 0; 90 } 91 if (dma8[dev] == SNDRV_AUTO_DMA) { 92 + dev_err(pdev, "please specify dma8\n"); 93 return 0; 94 } 95 return 1;