aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2009-02-19 02:38:55 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-19 04:22:24 -0500
commita69bb3c3fe0881d986ec78e253cb8a6bb9c28230 (patch)
tree8fdd56118e4237209d7dc29b1f4f5fbce4cb0077 /sound/pci/oxygen
parent6ed91157093c60e26bf0215b752f07af52935afc (diff)
sound: oxygen: use static driver name
When allocating resources, use a fixed name instead of reading it from the model structure. This allows us to allocate the resources before the actual model is known. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen')
-rw-r--r--sound/pci/oxygen/oxygen_lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 228f30800fd9..516d94ad2bbb 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -34,6 +34,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
34MODULE_DESCRIPTION("C-Media CMI8788 helper library"); 34MODULE_DESCRIPTION("C-Media CMI8788 helper library");
35MODULE_LICENSE("GPL v2"); 35MODULE_LICENSE("GPL v2");
36 36
37#define DRIVER "oxygen"
37 38
38static inline int oxygen_uart_input_ready(struct oxygen *chip) 39static inline int oxygen_uart_input_ready(struct oxygen *chip)
39{ 40{
@@ -481,7 +482,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
481 if (err < 0) 482 if (err < 0)
482 goto err_card; 483 goto err_card;
483 484
484 err = pci_request_regions(pci, model->chip); 485 err = pci_request_regions(pci, DRIVER);
485 if (err < 0) { 486 if (err < 0) {
486 snd_printk(KERN_ERR "cannot reserve PCI resources\n"); 487 snd_printk(KERN_ERR "cannot reserve PCI resources\n");
487 goto err_pci_enable; 488 goto err_pci_enable;
@@ -517,7 +518,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
517 chip->model.init(chip); 518 chip->model.init(chip);
518 519
519 err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED, 520 err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED,
520 chip->model.chip, chip); 521 DRIVER, chip);
521 if (err < 0) { 522 if (err < 0) {
522 snd_printk(KERN_ERR "cannot grab interrupt %d\n", pci->irq); 523 snd_printk(KERN_ERR "cannot grab interrupt %d\n", pci->irq);
523 goto err_card; 524 goto err_card;