OSDN Git Service

media: solo6x10: Convert to generic PCM copy ops
authorTakashi Iwai <tiwai@suse.de>
Tue, 15 Aug 2023 19:01:28 +0000 (21:01 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 18 Aug 2023 10:18:57 +0000 (12:18 +0200)
commit44f08b67f2d2c699f2b1784d2aacdf3760a09cc5
treeb663be0fba1b01179a7c9b4f35285861ff155f4f
parent62da99b56f0b43435896c4a5eca050631c99ce4f
media: solo6x10: Convert to generic PCM copy ops

This patch converts the solo6x10 driver code to use the new unified
PCM copy callback.  It's a straightforward conversion from *_user() to
*_iter() variants.  As copy_to_iter() updates the internal offest at
each write, we can drop the dst counter update in the loop, too.

Note that copy_to_iter() returns the copied bytes, hence the error
condition is adjusted accordingly.

Acked-by: Ismael Luceno <ismael@iodev.co.uk>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Bluecherry Maintainers <maintainers@bluecherrydvr.com>
Cc: Anton Sviridenko <anton@corp.bluecherry.net>
Cc: Andrey Utkin <andrey_utkin@fastmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Link: https://lore.kernel.org/r/20230815190136.8987-18-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/media/pci/solo6x10/solo6x10-g723.c