diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 12:24:41 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 16:28:21 +0100 |
commit | 8c77629996cbabee1d5b6d9b0d1e97cbca197ba1 (patch) | |
tree | 86baafac24bcadfd3c3839ae8a05ddbbc03c0a5f /sound/isa/sb/sb8_midi.c | |
parent | ALSA: msnd: Remove always NULL parameter (diff) | |
download | linux-8c77629996cbabee1d5b6d9b0d1e97cbca197ba1.tar.xz linux-8c77629996cbabee1d5b6d9b0d1e97cbca197ba1.zip |
ALSA: sb8: Remove always NULL parameters
snd_sb8dsp_pcm() and snd_sb8dsp_midi() take a pointer to a pointer of a
PCM/MIDI where if this parameter is provided the newly allocated object 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 <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/sb/sb8_midi.c')
-rw-r--r-- | sound/isa/sb/sb8_midi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c index 988a8b73475f..ffc71f0267df 100644 --- a/sound/isa/sb/sb8_midi.c +++ b/sound/isa/sb/sb8_midi.c @@ -263,13 +263,11 @@ static struct snd_rawmidi_ops snd_sb8dsp_midi_input = .trigger = snd_sb8dsp_midi_input_trigger, }; -int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawmidi) +int snd_sb8dsp_midi(struct snd_sb *chip, int device) { struct snd_rawmidi *rmidi; int err; - if (rrawmidi) - *rrawmidi = NULL; if ((err = snd_rawmidi_new(chip->card, "SB8 MIDI", device, 1, 1, &rmidi)) < 0) return err; strcpy(rmidi->name, "SB8 MIDI"); @@ -280,7 +278,5 @@ int snd_sb8dsp_midi(struct snd_sb *chip, int device, struct snd_rawmidi ** rrawm rmidi->info_flags |= SNDRV_RAWMIDI_INFO_DUPLEX; rmidi->private_data = chip; chip->rmidi = rmidi; - if (rrawmidi) - *rrawmidi = rmidi; return 0; } |