Commit 205d3e03 authored by Takashi Iwai's avatar Takashi Iwai

ASoC: pcm: Drop obsoleted PCM copy_user ops

Now all ASoC users have been replaced to use the new PCM copy ops,
let's drop the obsoleted copy_user ops and its helper function.
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230815190136.8987-25-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 36fc349a
...@@ -137,10 +137,6 @@ struct snd_soc_component_driver { ...@@ -137,10 +137,6 @@ struct snd_soc_component_driver {
struct timespec64 *audio_ts, struct timespec64 *audio_ts,
struct snd_pcm_audio_tstamp_config *audio_tstamp_config, struct snd_pcm_audio_tstamp_config *audio_tstamp_config,
struct snd_pcm_audio_tstamp_report *audio_tstamp_report); struct snd_pcm_audio_tstamp_report *audio_tstamp_report);
int (*copy_user)(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int channel,
unsigned long pos, void __user *buf,
unsigned long bytes);
int (*copy)(struct snd_soc_component *component, int (*copy)(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int channel, struct snd_pcm_substream *substream, int channel,
unsigned long pos, struct iov_iter *buf, unsigned long pos, struct iov_iter *buf,
...@@ -513,9 +509,6 @@ int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); ...@@ -513,9 +509,6 @@ int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg); unsigned int cmd, void *arg);
int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream); int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
int channel, unsigned long pos,
void __user *buf, unsigned long bytes);
int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream, int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
int channel, unsigned long pos, int channel, unsigned long pos,
struct iov_iter *buf, unsigned long bytes); struct iov_iter *buf, unsigned long bytes);
......
...@@ -1070,26 +1070,6 @@ int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream, ...@@ -1070,26 +1070,6 @@ int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
return -EINVAL; return -EINVAL;
} }
int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
int channel, unsigned long pos,
void __user *buf, unsigned long bytes)
{
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
struct snd_soc_component *component;
int i;
/* FIXME. it returns 1st copy now */
for_each_rtd_components(rtd, i, component)
if (component->driver->copy_user)
return soc_component_ret(
component,
component->driver->copy_user(
component, substream, channel,
pos, buf, bytes));
return -EINVAL;
}
struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream, struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream,
unsigned long offset) unsigned long offset)
{ {
......
...@@ -2975,8 +2975,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) ...@@ -2975,8 +2975,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
rtd->ops.sync_stop = snd_soc_pcm_component_sync_stop; rtd->ops.sync_stop = snd_soc_pcm_component_sync_stop;
if (drv->copy) if (drv->copy)
rtd->ops.copy = snd_soc_pcm_component_copy; rtd->ops.copy = snd_soc_pcm_component_copy;
else if (drv->copy_user)
rtd->ops.copy_user = snd_soc_pcm_component_copy_user;
if (drv->page) if (drv->page)
rtd->ops.page = snd_soc_pcm_component_page; rtd->ops.page = snd_soc_pcm_component_page;
if (drv->mmap) if (drv->mmap)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment