Skip to content

Commit 205d3e0

Browse files
committed
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: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230815190136.8987-25-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 36fc349 commit 205d3e0

3 files changed

Lines changed: 0 additions & 29 deletions

File tree

include/sound/soc-component.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ struct snd_soc_component_driver {
137137
struct timespec64 *audio_ts,
138138
struct snd_pcm_audio_tstamp_config *audio_tstamp_config,
139139
struct snd_pcm_audio_tstamp_report *audio_tstamp_report);
140-
int (*copy_user)(struct snd_soc_component *component,
141-
struct snd_pcm_substream *substream, int channel,
142-
unsigned long pos, void __user *buf,
143-
unsigned long bytes);
144140
int (*copy)(struct snd_soc_component *component,
145141
struct snd_pcm_substream *substream, int channel,
146142
unsigned long pos, struct iov_iter *buf,
@@ -513,9 +509,6 @@ int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
513509
int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
514510
unsigned int cmd, void *arg);
515511
int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
516-
int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
517-
int channel, unsigned long pos,
518-
void __user *buf, unsigned long bytes);
519512
int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
520513
int channel, unsigned long pos,
521514
struct iov_iter *buf, unsigned long bytes);

sound/soc/soc-component.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,26 +1070,6 @@ int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
10701070
return -EINVAL;
10711071
}
10721072

1073-
int snd_soc_pcm_component_copy_user(struct snd_pcm_substream *substream,
1074-
int channel, unsigned long pos,
1075-
void __user *buf, unsigned long bytes)
1076-
{
1077-
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
1078-
struct snd_soc_component *component;
1079-
int i;
1080-
1081-
/* FIXME. it returns 1st copy now */
1082-
for_each_rtd_components(rtd, i, component)
1083-
if (component->driver->copy_user)
1084-
return soc_component_ret(
1085-
component,
1086-
component->driver->copy_user(
1087-
component, substream, channel,
1088-
pos, buf, bytes));
1089-
1090-
return -EINVAL;
1091-
}
1092-
10931073
struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream,
10941074
unsigned long offset)
10951075
{

sound/soc/soc-pcm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2975,8 +2975,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
29752975
rtd->ops.sync_stop = snd_soc_pcm_component_sync_stop;
29762976
if (drv->copy)
29772977
rtd->ops.copy = snd_soc_pcm_component_copy;
2978-
else if (drv->copy_user)
2979-
rtd->ops.copy_user = snd_soc_pcm_component_copy_user;
29802978
if (drv->page)
29812979
rtd->ops.page = snd_soc_pcm_component_page;
29822980
if (drv->mmap)

0 commit comments

Comments
 (0)