Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: dummy: Convert to generic PCM copy ops

This patch converts the dummy driver code to use the new unified PCM
copy callback. As dummy driver doesn't do anything in the callback,
it's just a simple replacement.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230815190136.8987-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+2 -10
+2 -10
sound/drivers/dummy.c
··· 626 626 627 627 static int dummy_pcm_copy(struct snd_pcm_substream *substream, 628 628 int channel, unsigned long pos, 629 - void __user *dst, unsigned long bytes) 630 - { 631 - return 0; /* do nothing */ 632 - } 633 - 634 - static int dummy_pcm_copy_kernel(struct snd_pcm_substream *substream, 635 - int channel, unsigned long pos, 636 - void *dst, unsigned long bytes) 629 + struct iov_iter *iter, unsigned long bytes) 637 630 { 638 631 return 0; /* do nothing */ 639 632 } ··· 660 667 .prepare = dummy_pcm_prepare, 661 668 .trigger = dummy_pcm_trigger, 662 669 .pointer = dummy_pcm_pointer, 663 - .copy_user = dummy_pcm_copy, 664 - .copy_kernel = dummy_pcm_copy_kernel, 670 + .copy = dummy_pcm_copy, 665 671 .fill_silence = dummy_pcm_silence, 666 672 .page = dummy_pcm_page, 667 673 };