aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ad1889.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/ad1889.c')
-rw-r--r--sound/pci/ad1889.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 1610c38337af..850a8c984c25 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -40,14 +40,13 @@
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/module.h>
+#include <linux/io.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#include <sound/ac97_codec.h>
-#include <asm/io.h>
-
#include "ad1889.h"
#include "ac97/ac97_id.h"
@@ -623,14 +622,11 @@ snd_ad1889_interrupt(int irq, void *dev_id)
}
static int
-snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm)
+snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
{
int err;
struct snd_pcm *pcm;
- if (rpcm)
- *rpcm = NULL;
-
err = snd_pcm_new(chip->card, chip->card->driver, device, 1, 1, &pcm);
if (err < 0)
return err;
@@ -658,9 +654,6 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device, struct snd_pcm **rpcm)
return err;
}
- if (rpcm)
- *rpcm = pcm;
-
return 0;
}
@@ -859,12 +852,9 @@ snd_ad1889_free(struct snd_ad1889 *chip)
free_irq(chip->irq, chip);
skip_hw:
- if (chip->iobase)
- iounmap(chip->iobase);
-
+ iounmap(chip->iobase);
pci_release_regions(chip->pci);
pci_disable_device(chip->pci);
-
kfree(chip);
return 0;
}
@@ -1016,7 +1006,7 @@ snd_ad1889_probe(struct pci_dev *pci,
if (err < 0)
goto free_and_ret;
- err = snd_ad1889_pcm_init(chip, 0, NULL);
+ err = snd_ad1889_pcm_init(chip, 0);
if (err < 0)
goto free_and_ret;