diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 12:24:37 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 16:27:03 +0100 |
commit | 4b8ab88518726197c8659bc9aca96c6af01dab57 (patch) | |
tree | dd248ea06b8d5c9102889768cffc448e2d2e25a0 /sound/isa/es1688/es1688.c | |
parent | 7f605418837add961466dc66f7370332d44c1a92 (diff) | |
download | linux-stable-4b8ab88518726197c8659bc9aca96c6af01dab57.tar.gz linux-stable-4b8ab88518726197c8659bc9aca96c6af01dab57.tar.bz2 linux-stable-4b8ab88518726197c8659bc9aca96c6af01dab57.zip |
ALSA: es1688: Remove almost always NULL parameter
snd_es1688_pcm() takes a pointer to a pointer of a PCM where if this
parameter is provided the newly allocated PCM is stored. This PCM is also
available from the pcm field of the snd_es1688 struct that got passed to the
same function. This patch updates all callers which passed a pointer to use
that field instead and then removes the parameter from the function. This
makes the code a bit shorter and cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/es1688/es1688.c')
-rw-r--r-- | sound/isa/es1688/es1688.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c index 76001fe0579d..1901c2bb6c3b 100644 --- a/sound/isa/es1688/es1688.c +++ b/sound/isa/es1688/es1688.c @@ -138,10 +138,9 @@ static int snd_es1688_probe(struct snd_card *card, unsigned int n) { struct snd_es1688 *chip = card->private_data; struct snd_opl3 *opl3; - struct snd_pcm *pcm; int error; - error = snd_es1688_pcm(card, chip, 0, &pcm); + error = snd_es1688_pcm(card, chip, 0); if (error < 0) return error; @@ -150,9 +149,9 @@ static int snd_es1688_probe(struct snd_card *card, unsigned int n) return error; strlcpy(card->driver, "ES1688", sizeof(card->driver)); - strlcpy(card->shortname, pcm->name, sizeof(card->shortname)); + strlcpy(card->shortname, chip->pcm->name, sizeof(card->shortname)); snprintf(card->longname, sizeof(card->longname), - "%s at 0x%lx, irq %i, dma %i", pcm->name, chip->port, + "%s at 0x%lx, irq %i, dma %i", chip->pcm->name, chip->port, chip->irq, chip->dma8); if (fm_port[n] == SNDRV_AUTO_PORT) |