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