Skip to content

Commit

Permalink
ALSA: msnd: Remove always NULL parameter
Browse files Browse the repository at this point in the history
snd_msnd_pcm() takes a pointer to a pointer of a PCM where if this parameter
is provided the newly allocated PCM is stored. All callers pass NULL though,
so remove the parameter. This makes the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
larsclausen authored and tiwai committed Jan 2, 2015
1 parent db5abb3 commit f6be4e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions sound/isa/msnd/msnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,7 @@ static struct snd_pcm_ops snd_msnd_capture_ops = {
};


int snd_msnd_pcm(struct snd_card *card, int device,
struct snd_pcm **rpcm)
int snd_msnd_pcm(struct snd_card *card, int device)
{
struct snd_msnd *chip = card->private_data;
struct snd_pcm *pcm;
Expand All @@ -696,9 +695,6 @@ int snd_msnd_pcm(struct snd_card *card, int device,
pcm->private_data = chip;
strcpy(pcm->name, "Hurricane");


if (rpcm)
*rpcm = pcm;
return 0;
}
EXPORT_SYMBOL(snd_msnd_pcm);
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/msnd/msnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ int snd_msnd_disable_irq(struct snd_msnd *chip);
void snd_msnd_dsp_halt(struct snd_msnd *chip, struct file *file);
int snd_msnd_DAPQ(struct snd_msnd *chip, int start);
int snd_msnd_DARQ(struct snd_msnd *chip, int start);
int snd_msnd_pcm(struct snd_card *card, int device, struct snd_pcm **rpcm);
int snd_msnd_pcm(struct snd_card *card, int device);

int snd_msndmidi_new(struct snd_card *card, int device);
void snd_msndmidi_input_read(void *mpu);
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/msnd/msnd_pinnacle.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ static int snd_msnd_attach(struct snd_card *card)
if (err < 0)
goto err_release_region;

err = snd_msnd_pcm(card, 0, NULL);
err = snd_msnd_pcm(card, 0);
if (err < 0) {
printk(KERN_ERR LOGNAME ": error creating new PCM device\n");
goto err_release_region;
Expand Down

0 comments on commit f6be4e6

Please sign in to comment.