]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: remove direct access of dev->bus_id in sound/isa/*
authorTakashi Iwai <tiwai@suse.de>
Mon, 3 Nov 2008 07:51:33 +0000 (08:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 3 Nov 2008 07:57:40 +0000 (08:57 +0100)
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>
sound/isa/ad1848/ad1848.c
sound/isa/adlib.c
sound/isa/cs423x/cs4231.c
sound/isa/cs423x/cs4236.c
sound/isa/es1688/es1688.c
sound/isa/gus/gusclassic.c
sound/isa/gus/gusextreme.c
sound/isa/sb/sb8.c

index b68d20edc20f2f1aa3ffb5d0a106b2591c2f77fd..223a6c038819217a2d5bfb74e81bfd6a56ba1d86 100644 (file)
@@ -70,15 +70,15 @@ static int __devinit snd_ad1848_match(struct device *dev, unsigned int n)
                return 0;
 
        if (port[n] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+               dev_err(dev, "please specify port\n");
                return 0;
        }
        if (irq[n] == SNDRV_AUTO_IRQ) {
-               snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
+               dev_err(dev, "please specify irq\n");
                return 0;       
        }
        if (dma1[n] == SNDRV_AUTO_DMA) {
-               snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id);
+               dev_err(dev, "please specify dma1\n");
                return 0;
        }
        return 1;
index efa8c80d05b69eecc9b03795e609b60b497bd77a..374b7177e111d2f806930d84cdb147c1ace28356 100644 (file)
@@ -36,7 +36,7 @@ static int __devinit snd_adlib_match(struct device *dev, unsigned int n)
                return 0;
 
        if (port[n] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+               dev_err(dev, "please specify port\n");
                return 0;
        }
        return 1;
@@ -55,13 +55,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
 
        card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
        if (!card) {
-               snd_printk(KERN_ERR "%s: could not create card\n", dev->bus_id);
+               dev_err(dev, "could not create card\n");
                return -EINVAL;
        }
 
        card->private_data = request_region(port[n], 4, CRD_NAME);
        if (!card->private_data) {
-               snd_printk(KERN_ERR "%s: could not grab ports\n", dev->bus_id);
+               dev_err(dev, "could not grab ports\n");
                error = -EBUSY;
                goto out;
        }
@@ -73,13 +73,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
 
        error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not create OPL\n", dev->bus_id);
+               dev_err(dev, "could not create OPL\n");
                goto out;
        }
 
        error = snd_opl3_hwdep_new(opl3, 0, 0, NULL);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not create FM\n", dev->bus_id);
+               dev_err(dev, "could not create FM\n");
                goto out;
        }
 
@@ -87,7 +87,7 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
 
        error = snd_card_register(card);
        if (error < 0) {
-               snd_printk(KERN_ERR "%s: could not register card\n", dev->bus_id);
+               dev_err(dev, "could not register card\n");
                goto out;
        }
 
index ddd289120aa8e06fc6bc194102f39b1f2e740028..f019d449e2d65cd243c9a5aec5b51c35441c5e99 100644 (file)
@@ -74,15 +74,15 @@ static int __devinit snd_cs4231_match(struct device *dev, unsigned int n)
                return 0;
 
        if (port[n] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify port\n", dev->bus_id);
+               dev_err(dev, "please specify port\n");
                return 0;
        }
        if (irq[n] == SNDRV_AUTO_IRQ) {
-               snd_printk(KERN_ERR "%s: please specify irq\n", dev->bus_id);
+               dev_err(dev, "please specify irq\n");
                return 0;
        }
        if (dma1[n] == SNDRV_AUTO_DMA) {
-               snd_printk(KERN_ERR "%s: please specify dma1\n", dev->bus_id);
+               dev_err(dev, "please specify dma1\n");
                return 0;
        }
        return 1;
@@ -133,7 +133,7 @@ static int __devinit snd_cs4231_probe(struct device *dev, unsigned int n)
                                        mpu_port[n], 0, mpu_irq[n],
                                        mpu_irq[n] >= 0 ? IRQF_DISABLED : 0,
                                        NULL) < 0)
-                       printk(KERN_WARNING "%s: MPU401 not detected\n", dev->bus_id);
+                       dev_warn(dev, "MPU401 not detected\n");
        }
 
        snd_card_set_dev(card, dev);
index 91f9c15d3e30b8dfd29ce2bc5d68a33aa30d38d6..019c9401663eb9839787f63f4b32d0d9f1cba20b 100644 (file)
@@ -488,19 +488,19 @@ static int __devinit snd_cs423x_isa_match(struct device *pdev,
                return 0;
 
        if (port[dev] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify port\n", pdev->bus_id);
+               dev_err(pdev, "please specify port\n");
                return 0;
        }
        if (cport[dev] == SNDRV_AUTO_PORT) {
-               snd_printk(KERN_ERR "%s: please specify cport\n", pdev->bus_id);
+               dev_err(pdev, "please specify cport\n");
                return 0;
        }
        if (irq[dev] == SNDRV_AUTO_IRQ) {
-               snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id);
+               dev_err(pdev, "please specify irq\n");
                return 0;
        }
        if (dma1[dev] == SNDRV_AUTO_DMA) {
-               snd_printk(KERN_ERR "%s: please specify dma1\n", pdev->bus_id);
+               dev_err(pdev, "please specify dma1\n");
                return 0;
        }
        return 1;
index f88639ea64b214ddd976ef6577eab8100f2741f4..b46377139cf81d4ffc73d1e10572f6996c5ad4c3 100644 (file)
@@ -88,16 +88,14 @@ static int __devinit snd_es1688_legacy_create(struct snd_card *card,
        if (irq[n] == SNDRV_AUTO_IRQ) {
                irq[n] = snd_legacy_find_free_irq(possible_irqs);
                if (irq[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free IRQ\n",
-                               dev->bus_id);
+                       dev_err(dev, "unable to find a free IRQ\n");
                        return -EBUSY;
                }
        }
        if (dma8[n] == SNDRV_AUTO_DMA) {
                dma8[n] = snd_legacy_find_free_dma(possible_dmas);
                if (dma8[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free DMA\n",
-                               dev->bus_id);
+                       dev_err(dev, "unable to find a free DMA\n");
                        return -EBUSY;
                }
        }
@@ -147,8 +145,7 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n)
 
        if (snd_opl3_create(card, chip->port, chip->port + 2,
                        OPL3_HW_OPL3, 0, &opl3) < 0)
-               printk(KERN_WARNING "%s: opl3 not detected at 0x%lx\n",
-                       dev->bus_id, chip->port);
+               dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port);
        else {
                error = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
                if (error < 0)
index 8f914b37bf8998eaa261127b9dc53901e6b2d8b5..426532a4d730cfdcc2fa053db7b7f83d84187581 100644 (file)
@@ -90,24 +90,21 @@ static int __devinit snd_gusclassic_create(struct snd_card *card,
        if (irq[n] == SNDRV_AUTO_IRQ) {
                irq[n] = snd_legacy_find_free_irq(possible_irqs);
                if (irq[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free IRQ\n",
-                               dev->bus_id);
+                       dev_err(dev, "unable to find a free IRQ\n");
                        return -EBUSY;
                }
        }
        if (dma1[n] == SNDRV_AUTO_DMA) {
                dma1[n] = snd_legacy_find_free_dma(possible_dmas);
                if (dma1[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free DMA1\n",
-                               dev->bus_id);
+                       dev_err(dev, "unable to find a free DMA1\n");
                        return -EBUSY;
                }
        }
        if (dma2[n] == SNDRV_AUTO_DMA) {
                dma2[n] = snd_legacy_find_free_dma(possible_dmas);
                if (dma2[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free DMA2\n",
-                               dev->bus_id);
+                       dev_err(dev, "unable to find a free DMA2\n");
                        return -EBUSY;
                }
        }
@@ -174,8 +171,8 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n)
 
        error = -ENODEV;
        if (gus->max_flag || gus->ess_flag) {
-               snd_printk(KERN_ERR "%s: GUS Classic or ACE soundcard was "
-                       "not detected at 0x%lx\n", dev->bus_id, gus->gf1.port);
+               dev_err(dev, "GUS Classic or ACE soundcard was "
+                       "not detected at 0x%lx\n", gus->gf1.port);
                goto out;
        }
 
index da13185eb0a034852117982d7069b108b0004bd8..7ad4c3b41a848092b2c7d4795d3e70aa1ebb0a4a 100644 (file)
@@ -106,16 +106,14 @@ static int __devinit snd_gusextreme_es1688_create(struct snd_card *card,
        if (irq[n] == SNDRV_AUTO_IRQ) {
                irq[n] = snd_legacy_find_free_irq(possible_irqs);
                if (irq[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free IRQ "
-                               "for ES1688\n", dev->bus_id);
+                       dev_err(dev, "unable to find a free IRQ for ES1688\n");
                        return -EBUSY;
                }
        }
        if (dma8[n] == SNDRV_AUTO_DMA) {
                dma8[n] = snd_legacy_find_free_dma(possible_dmas);
                if (dma8[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free DMA "
-                               "for ES1688\n", dev->bus_id);
+                       dev_err(dev, "unable to find a free DMA for ES1688\n");
                        return -EBUSY;
                }
        }
@@ -143,16 +141,14 @@ static int __devinit snd_gusextreme_gus_card_create(struct snd_card *card,
        if (gf1_irq[n] == SNDRV_AUTO_IRQ) {
                gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs);
                if (gf1_irq[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free IRQ "
-                               "for GF1\n", dev->bus_id);
+                       dev_err(dev, "unable to find a free IRQ for GF1\n");
                        return -EBUSY;
                }
        }
        if (dma1[n] == SNDRV_AUTO_DMA) {
                dma1[n] = snd_legacy_find_free_dma(possible_dmas);
                if (dma1[n] < 0) {
-                       snd_printk(KERN_ERR "%s: unable to find a free DMA "
-                               "for GF1\n", dev->bus_id);
+                       dev_err(dev, "unable to find a free DMA for GF1\n");
                        return -EBUSY;
                }
        }
@@ -278,8 +274,8 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)
 
        error = -ENODEV;
        if (!gus->ess_flag) {
-               snd_printk(KERN_ERR "%s: GUS Extreme soundcard was not "
-                       "detected at 0x%lx\n", dev->bus_id, gus->gf1.port);
+               dev_err(dev, "GUS Extreme soundcard was not "
+                       "detected at 0x%lx\n", gus->gf1.port);
                goto out;
        }
        gus->codec_flag = 1;
@@ -310,8 +306,7 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)
 
        if (snd_opl3_create(card, es1688->port, es1688->port + 2,
                        OPL3_HW_OPL3, 0, &opl3) < 0)
-               printk(KERN_ERR "%s: opl3 not detected at 0x%lx\n",
-                       dev->bus_id, es1688->port);
+               dev_warn(dev, "opl3 not detected at 0x%lx\n", es1688->port);
        else {
                error = snd_opl3_hwdep_new(opl3, 0, 2, NULL);
                if (error < 0)
index 336a34277907f0ec74b30816187eb3d14c7909d3..667eccc676a40a8898f887ef21288cefa717624f 100644 (file)
@@ -85,11 +85,11 @@ static int __devinit snd_sb8_match(struct device *pdev, unsigned int dev)
        if (!enable[dev])
                return 0;
        if (irq[dev] == SNDRV_AUTO_IRQ) {
-               snd_printk(KERN_ERR "%s: please specify irq\n", pdev->bus_id);
+               dev_err(pdev, "please specify irq\n");
                return 0;
        }
        if (dma8[dev] == SNDRV_AUTO_DMA) {
-               snd_printk(KERN_ERR "%s: please specify dma8\n", pdev->bus_id);
+               dev_err(pdev, "please specify dma8\n");
                return 0;
        }
        return 1;