Skip to content

Commit

Permalink
sound: oxygen: use static driver name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Feb 19, 2009
1 parent 6ed9115 commit a69bb3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/pci/oxygen/oxygen_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
MODULE_DESCRIPTION("C-Media CMI8788 helper library");
MODULE_LICENSE("GPL v2");

#define DRIVER "oxygen"

static inline int oxygen_uart_input_ready(struct oxygen *chip)
{
Expand Down Expand Up @@ -481,7 +482,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
if (err < 0)
goto err_card;

err = pci_request_regions(pci, model->chip);
err = pci_request_regions(pci, DRIVER);
if (err < 0) {
snd_printk(KERN_ERR "cannot reserve PCI resources\n");
goto err_pci_enable;
Expand Down Expand Up @@ -517,7 +518,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
chip->model.init(chip);

err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED,
chip->model.chip, chip);
DRIVER, chip);
if (err < 0) {
snd_printk(KERN_ERR "cannot grab interrupt %d\n", pci->irq);
goto err_card;
Expand Down

0 comments on commit a69bb3c

Please sign in to comment.