diff options
author | Adrian Knoth <aknoth@google.com> | 2015-02-16 18:05:06 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-17 01:40:36 -0500 |
commit | 0c8d948565490d2a2db9d9a5aec388342c7d38ce (patch) | |
tree | 9f2851e470b5336bc923954e904d44f14415b55c | |
parent | 8b73b867294364ae3007affdf8cfd28f022b158c (diff) |
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>
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 4e1cfb91a8d8..cb666c73712d 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -6354,19 +6354,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, | |||
6354 | return 0; | 6354 | return 0; |
6355 | } | 6355 | } |
6356 | 6356 | ||
6357 | static struct snd_pcm_ops snd_hdspm_playback_ops = { | 6357 | static struct snd_pcm_ops snd_hdspm_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 = { | ||
6370 | .open = snd_hdspm_open, | 6358 | .open = snd_hdspm_open, |
6371 | .close = snd_hdspm_release, | 6359 | .close = snd_hdspm_release, |
6372 | .ioctl = snd_hdspm_ioctl, | 6360 | .ioctl = snd_hdspm_ioctl, |
@@ -6462,9 +6450,9 @@ static int snd_hdspm_create_pcm(struct snd_card *card, | |||
6462 | strcpy(pcm->name, hdspm->card_name); | 6450 | strcpy(pcm->name, hdspm->card_name); |
6463 | 6451 | ||
6464 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, | 6452 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, |
6465 | &snd_hdspm_playback_ops); | 6453 | &snd_hdspm_ops); |
6466 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, | 6454 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, |
6467 | &snd_hdspm_capture_ops); | 6455 | &snd_hdspm_ops); |
6468 | 6456 | ||
6469 | pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; | 6457 | pcm->info_flags = SNDRV_PCM_INFO_JOINT_DUPLEX; |
6470 | 6458 | ||