diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-03 02:51:33 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-03 02:57:40 -0500 |
commit | 0418ff0c8e48aae4e5e0cbcd3e19a057bea2e55a (patch) | |
tree | 4aca380581950da39813403b05d2e2b7798ff6f1 /sound | |
parent | bb072bf0980abbe4fc905df91857a8ad34ca673c (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/isa/ad1848/ad1848.c | 6 | ||||
-rw-r--r-- | sound/isa/adlib.c | 12 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4231.c | 8 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 8 | ||||
-rw-r--r-- | sound/isa/es1688/es1688.c | 9 | ||||
-rw-r--r-- | sound/isa/gus/gusclassic.c | 13 | ||||
-rw-r--r-- | sound/isa/gus/gusextreme.c | 19 | ||||
-rw-r--r-- | sound/isa/sb/sb8.c | 4 |
8 files changed, 34 insertions, 45 deletions
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c index b68d20edc20f..223a6c038819 100644 --- a/sound/isa/ad1848/ad1848.c +++ b/sound/isa/ad1848/ad1848.c | |||
@@ -70,15 +70,15 @@ static int __devinit snd_ad1848_match(struct device *dev, unsigned int n) | |||
70 | return 0; | 70 | return 0; |
71 | 71 | ||
72 | if (port[n] == SNDRV_AUTO_PORT) { | 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 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | if (irq[n] == SNDRV_AUTO_IRQ) { | 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 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | if (dma1[n] == SNDRV_AUTO_DMA) { | 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 | return 0; | 82 | return 0; |
83 | } | 83 | } |
84 | return 1; | 84 | return 1; |
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c index efa8c80d05b6..374b7177e111 100644 --- a/sound/isa/adlib.c +++ b/sound/isa/adlib.c | |||
@@ -36,7 +36,7 @@ static int __devinit snd_adlib_match(struct device *dev, unsigned int n) | |||
36 | return 0; | 36 | return 0; |
37 | 37 | ||
38 | if (port[n] == SNDRV_AUTO_PORT) { | 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 | return 0; | 40 | return 0; |
41 | } | 41 | } |
42 | return 1; | 42 | return 1; |
@@ -55,13 +55,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n) | |||
55 | 55 | ||
56 | card = snd_card_new(index[n], id[n], THIS_MODULE, 0); | 56 | card = snd_card_new(index[n], id[n], THIS_MODULE, 0); |
57 | if (!card) { | 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 | return -EINVAL; | 59 | return -EINVAL; |
60 | } | 60 | } |
61 | 61 | ||
62 | card->private_data = request_region(port[n], 4, CRD_NAME); | 62 | card->private_data = request_region(port[n], 4, CRD_NAME); |
63 | if (!card->private_data) { | 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 | error = -EBUSY; | 65 | error = -EBUSY; |
66 | goto out; | 66 | goto out; |
67 | } | 67 | } |
@@ -73,13 +73,13 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n) | |||
73 | 73 | ||
74 | error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3); | 74 | error = snd_opl3_create(card, port[n], port[n] + 2, OPL3_HW_AUTO, 1, &opl3); |
75 | if (error < 0) { | 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 | goto out; | 77 | goto out; |
78 | } | 78 | } |
79 | 79 | ||
80 | error = snd_opl3_hwdep_new(opl3, 0, 0, NULL); | 80 | error = snd_opl3_hwdep_new(opl3, 0, 0, NULL); |
81 | if (error < 0) { | 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 | goto out; | 83 | goto out; |
84 | } | 84 | } |
85 | 85 | ||
@@ -87,7 +87,7 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n) | |||
87 | 87 | ||
88 | error = snd_card_register(card); | 88 | error = snd_card_register(card); |
89 | if (error < 0) { | 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 | goto out; | 91 | goto out; |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c index ddd289120aa8..f019d449e2d6 100644 --- a/sound/isa/cs423x/cs4231.c +++ b/sound/isa/cs423x/cs4231.c | |||
@@ -74,15 +74,15 @@ static int __devinit snd_cs4231_match(struct device *dev, unsigned int n) | |||
74 | return 0; | 74 | return 0; |
75 | 75 | ||
76 | if (port[n] == SNDRV_AUTO_PORT) { | 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 | return 0; | 78 | return 0; |
79 | } | 79 | } |
80 | if (irq[n] == SNDRV_AUTO_IRQ) { | 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 | return 0; | 82 | return 0; |
83 | } | 83 | } |
84 | if (dma1[n] == SNDRV_AUTO_DMA) { | 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 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | return 1; | 88 | return 1; |
@@ -133,7 +133,7 @@ static int __devinit snd_cs4231_probe(struct device *dev, unsigned int n) | |||
133 | mpu_port[n], 0, mpu_irq[n], | 133 | mpu_port[n], 0, mpu_irq[n], |
134 | mpu_irq[n] >= 0 ? IRQF_DISABLED : 0, | 134 | mpu_irq[n] >= 0 ? IRQF_DISABLED : 0, |
135 | NULL) < 0) | 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 | snd_card_set_dev(card, dev); | 139 | snd_card_set_dev(card, dev); |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index 91f9c15d3e30..019c9401663e 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -488,19 +488,19 @@ static int __devinit snd_cs423x_isa_match(struct device *pdev, | |||
488 | return 0; | 488 | return 0; |
489 | 489 | ||
490 | if (port[dev] == SNDRV_AUTO_PORT) { | 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 | return 0; | 492 | return 0; |
493 | } | 493 | } |
494 | if (cport[dev] == SNDRV_AUTO_PORT) { | 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 | return 0; | 496 | return 0; |
497 | } | 497 | } |
498 | if (irq[dev] == SNDRV_AUTO_IRQ) { | 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 | return 0; | 500 | return 0; |
501 | } | 501 | } |
502 | if (dma1[dev] == SNDRV_AUTO_DMA) { | 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 | return 0; | 504 | return 0; |
505 | } | 505 | } |
506 | return 1; | 506 | return 1; |
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index f88639ea64b2..b46377139cf8 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c | |||
@@ -88,16 +88,14 @@ static int __devinit snd_es1688_legacy_create(struct snd_card *card, | |||
88 | if (irq[n] == SNDRV_AUTO_IRQ) { | 88 | if (irq[n] == SNDRV_AUTO_IRQ) { |
89 | irq[n] = snd_legacy_find_free_irq(possible_irqs); | 89 | irq[n] = snd_legacy_find_free_irq(possible_irqs); |
90 | if (irq[n] < 0) { | 90 | if (irq[n] < 0) { |
91 | snd_printk(KERN_ERR "%s: unable to find a free IRQ\n", | 91 | dev_err(dev, "unable to find a free IRQ\n"); |
92 | dev->bus_id); | ||
93 | return -EBUSY; | 92 | return -EBUSY; |
94 | } | 93 | } |
95 | } | 94 | } |
96 | if (dma8[n] == SNDRV_AUTO_DMA) { | 95 | if (dma8[n] == SNDRV_AUTO_DMA) { |
97 | dma8[n] = snd_legacy_find_free_dma(possible_dmas); | 96 | dma8[n] = snd_legacy_find_free_dma(possible_dmas); |
98 | if (dma8[n] < 0) { | 97 | if (dma8[n] < 0) { |
99 | snd_printk(KERN_ERR "%s: unable to find a free DMA\n", | 98 | dev_err(dev, "unable to find a free DMA\n"); |
100 | dev->bus_id); | ||
101 | return -EBUSY; | 99 | return -EBUSY; |
102 | } | 100 | } |
103 | } | 101 | } |
@@ -147,8 +145,7 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n) | |||
147 | 145 | ||
148 | if (snd_opl3_create(card, chip->port, chip->port + 2, | 146 | if (snd_opl3_create(card, chip->port, chip->port + 2, |
149 | OPL3_HW_OPL3, 0, &opl3) < 0) | 147 | OPL3_HW_OPL3, 0, &opl3) < 0) |
150 | printk(KERN_WARNING "%s: opl3 not detected at 0x%lx\n", | 148 | dev_warn(dev, "opl3 not detected at 0x%lx\n", chip->port); |
151 | dev->bus_id, chip->port); | ||
152 | else { | 149 | else { |
153 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); | 150 | error = snd_opl3_hwdep_new(opl3, 0, 1, NULL); |
154 | if (error < 0) | 151 | if (error < 0) |
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c index 8f914b37bf89..426532a4d730 100644 --- a/sound/isa/gus/gusclassic.c +++ b/sound/isa/gus/gusclassic.c | |||
@@ -90,24 +90,21 @@ static int __devinit snd_gusclassic_create(struct snd_card *card, | |||
90 | if (irq[n] == SNDRV_AUTO_IRQ) { | 90 | if (irq[n] == SNDRV_AUTO_IRQ) { |
91 | irq[n] = snd_legacy_find_free_irq(possible_irqs); | 91 | irq[n] = snd_legacy_find_free_irq(possible_irqs); |
92 | if (irq[n] < 0) { | 92 | if (irq[n] < 0) { |
93 | snd_printk(KERN_ERR "%s: unable to find a free IRQ\n", | 93 | dev_err(dev, "unable to find a free IRQ\n"); |
94 | dev->bus_id); | ||
95 | return -EBUSY; | 94 | return -EBUSY; |
96 | } | 95 | } |
97 | } | 96 | } |
98 | if (dma1[n] == SNDRV_AUTO_DMA) { | 97 | if (dma1[n] == SNDRV_AUTO_DMA) { |
99 | dma1[n] = snd_legacy_find_free_dma(possible_dmas); | 98 | dma1[n] = snd_legacy_find_free_dma(possible_dmas); |
100 | if (dma1[n] < 0) { | 99 | if (dma1[n] < 0) { |
101 | snd_printk(KERN_ERR "%s: unable to find a free DMA1\n", | 100 | dev_err(dev, "unable to find a free DMA1\n"); |
102 | dev->bus_id); | ||
103 | return -EBUSY; | 101 | return -EBUSY; |
104 | } | 102 | } |
105 | } | 103 | } |
106 | if (dma2[n] == SNDRV_AUTO_DMA) { | 104 | if (dma2[n] == SNDRV_AUTO_DMA) { |
107 | dma2[n] = snd_legacy_find_free_dma(possible_dmas); | 105 | dma2[n] = snd_legacy_find_free_dma(possible_dmas); |
108 | if (dma2[n] < 0) { | 106 | if (dma2[n] < 0) { |
109 | snd_printk(KERN_ERR "%s: unable to find a free DMA2\n", | 107 | dev_err(dev, "unable to find a free DMA2\n"); |
110 | dev->bus_id); | ||
111 | return -EBUSY; | 108 | return -EBUSY; |
112 | } | 109 | } |
113 | } | 110 | } |
@@ -174,8 +171,8 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n) | |||
174 | 171 | ||
175 | error = -ENODEV; | 172 | error = -ENODEV; |
176 | if (gus->max_flag || gus->ess_flag) { | 173 | if (gus->max_flag || gus->ess_flag) { |
177 | snd_printk(KERN_ERR "%s: GUS Classic or ACE soundcard was " | 174 | dev_err(dev, "GUS Classic or ACE soundcard was " |
178 | "not detected at 0x%lx\n", dev->bus_id, gus->gf1.port); | 175 | "not detected at 0x%lx\n", gus->gf1.port); |
179 | goto out; | 176 | goto out; |
180 | } | 177 | } |
181 | 178 | ||
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index da13185eb0a0..7ad4c3b41a84 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -106,16 +106,14 @@ static int __devinit snd_gusextreme_es1688_create(struct snd_card *card, | |||
106 | if (irq[n] == SNDRV_AUTO_IRQ) { | 106 | if (irq[n] == SNDRV_AUTO_IRQ) { |
107 | irq[n] = snd_legacy_find_free_irq(possible_irqs); | 107 | irq[n] = snd_legacy_find_free_irq(possible_irqs); |
108 | if (irq[n] < 0) { | 108 | if (irq[n] < 0) { |
109 | snd_printk(KERN_ERR "%s: unable to find a free IRQ " | 109 | dev_err(dev, "unable to find a free IRQ for ES1688\n"); |
110 | "for ES1688\n", dev->bus_id); | ||
111 | return -EBUSY; | 110 | return -EBUSY; |
112 | } | 111 | } |
113 | } | 112 | } |
114 | if (dma8[n] == SNDRV_AUTO_DMA) { | 113 | if (dma8[n] == SNDRV_AUTO_DMA) { |
115 | dma8[n] = snd_legacy_find_free_dma(possible_dmas); | 114 | dma8[n] = snd_legacy_find_free_dma(possible_dmas); |
116 | if (dma8[n] < 0) { | 115 | if (dma8[n] < 0) { |
117 | snd_printk(KERN_ERR "%s: unable to find a free DMA " | 116 | dev_err(dev, "unable to find a free DMA for ES1688\n"); |
118 | "for ES1688\n", dev->bus_id); | ||
119 | return -EBUSY; | 117 | return -EBUSY; |
120 | } | 118 | } |
121 | } | 119 | } |
@@ -143,16 +141,14 @@ static int __devinit snd_gusextreme_gus_card_create(struct snd_card *card, | |||
143 | if (gf1_irq[n] == SNDRV_AUTO_IRQ) { | 141 | if (gf1_irq[n] == SNDRV_AUTO_IRQ) { |
144 | gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs); | 142 | gf1_irq[n] = snd_legacy_find_free_irq(possible_irqs); |
145 | if (gf1_irq[n] < 0) { | 143 | if (gf1_irq[n] < 0) { |
146 | snd_printk(KERN_ERR "%s: unable to find a free IRQ " | 144 | dev_err(dev, "unable to find a free IRQ for GF1\n"); |
147 | "for GF1\n", dev->bus_id); | ||
148 | return -EBUSY; | 145 | return -EBUSY; |
149 | } | 146 | } |
150 | } | 147 | } |
151 | if (dma1[n] == SNDRV_AUTO_DMA) { | 148 | if (dma1[n] == SNDRV_AUTO_DMA) { |
152 | dma1[n] = snd_legacy_find_free_dma(possible_dmas); | 149 | dma1[n] = snd_legacy_find_free_dma(possible_dmas); |
153 | if (dma1[n] < 0) { | 150 | if (dma1[n] < 0) { |
154 | snd_printk(KERN_ERR "%s: unable to find a free DMA " | 151 | dev_err(dev, "unable to find a free DMA for GF1\n"); |
155 | "for GF1\n", dev->bus_id); | ||
156 | return -EBUSY; | 152 | return -EBUSY; |
157 | } | 153 | } |
158 | } | 154 | } |
@@ -278,8 +274,8 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
278 | 274 | ||
279 | error = -ENODEV; | 275 | error = -ENODEV; |
280 | if (!gus->ess_flag) { | 276 | if (!gus->ess_flag) { |
281 | snd_printk(KERN_ERR "%s: GUS Extreme soundcard was not " | 277 | dev_err(dev, "GUS Extreme soundcard was not " |
282 | "detected at 0x%lx\n", dev->bus_id, gus->gf1.port); | 278 | "detected at 0x%lx\n", gus->gf1.port); |
283 | goto out; | 279 | goto out; |
284 | } | 280 | } |
285 | gus->codec_flag = 1; | 281 | gus->codec_flag = 1; |
@@ -310,8 +306,7 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
310 | 306 | ||
311 | if (snd_opl3_create(card, es1688->port, es1688->port + 2, | 307 | if (snd_opl3_create(card, es1688->port, es1688->port + 2, |
312 | OPL3_HW_OPL3, 0, &opl3) < 0) | 308 | OPL3_HW_OPL3, 0, &opl3) < 0) |
313 | printk(KERN_ERR "%s: opl3 not detected at 0x%lx\n", | 309 | dev_warn(dev, "opl3 not detected at 0x%lx\n", es1688->port); |
314 | dev->bus_id, es1688->port); | ||
315 | else { | 310 | else { |
316 | error = snd_opl3_hwdep_new(opl3, 0, 2, NULL); | 311 | error = snd_opl3_hwdep_new(opl3, 0, 2, NULL); |
317 | if (error < 0) | 312 | if (error < 0) |
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index 336a34277907..667eccc676a4 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c | |||
@@ -85,11 +85,11 @@ static int __devinit snd_sb8_match(struct device *pdev, unsigned int dev) | |||
85 | if (!enable[dev]) | 85 | if (!enable[dev]) |
86 | return 0; | 86 | return 0; |
87 | if (irq[dev] == SNDRV_AUTO_IRQ) { | 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 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | if (dma8[dev] == SNDRV_AUTO_DMA) { | 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 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | return 1; | 95 | return 1; |