Skip to content

Commit 0c8d948

Browse files
adiknothtiwai
authored andcommitted
ALSA: hdspm - DRY cleanup of snd_pcm_ops
This commit removes code duplication between snd_hdspm_{capture,playback}_ops. No semantic changes intended, this is purely cosmetic. Signed-off-by: Adrian Knoth <aknoth@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 8b73b86 commit 0c8d948

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

sound/pci/rme9652/hdspm.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6354,19 +6354,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file,
63546354
return 0;
63556355
}
63566356

6357-
static struct snd_pcm_ops snd_hdspm_playback_ops = {
6358-
.open = snd_hdspm_open,
6359-
.close = snd_hdspm_release,
6360-
.ioctl = snd_hdspm_ioctl,
6361-
.hw_params = snd_hdspm_hw_params,
6362-
.hw_free = snd_hdspm_hw_free,
6363-
.prepare = snd_hdspm_prepare,
6364-
.trigger = snd_hdspm_trigger,
6365-
.pointer = snd_hdspm_hw_pointer,
6366-
.page = snd_pcm_sgbuf_ops_page,
6367-
};
6368-
6369-
static struct snd_pcm_ops snd_hdspm_capture_ops = {
6357+
static struct snd_pcm_ops snd_hdspm_ops = {
63706358
.open = snd_hdspm_open,
63716359
.close = snd_hdspm_release,
63726360
.ioctl = snd_hdspm_ioctl,
@@ -6462,9 +6450,9 @@ static int snd_hdspm_create_pcm(struct snd_card *card,
64626450
strcpy(pcm->name, hdspm->card_name);
64636451

64646452
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
6465-
&snd_hdspm_playback_ops);
6453+
&snd_hdspm_ops);
64666454
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
6467-
&snd_hdspm_capture_ops);
6455+
&snd_hdspm_ops);
64686456

64696457
pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX;
64706458

0 commit comments

Comments
 (0)