From: Cezary Rojewski Date: Fri, 12 Dec 2025 10:38:56 +0000 (+0100) Subject: ASoC: Intel: catpt: Simplify catpt_stream_read_position() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d44f62b09b1e97baee3b10484a1c3c203bb83caf;p=thirdparty%2Fkernel%2Flinux.git ASoC: Intel: catpt: Simplify catpt_stream_read_position() Add position to the argument list to simplify the wrapper. Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20251212103858.110701-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c index cc43346f83af4..cbb1c39424095 100644 --- a/sound/soc/intel/catpt/pcm.c +++ b/sound/soc/intel/catpt/pcm.c @@ -114,14 +114,10 @@ catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id) return result; } -static u32 catpt_stream_read_position(struct catpt_dev *cdev, - struct catpt_stream_runtime *stream) +static void catpt_stream_read_position(struct catpt_dev *cdev, + struct catpt_stream_runtime *stream, u32 *pos) { - u32 pos; - - memcpy_fromio(&pos, cdev->lpe_ba + stream->info.read_pos_regaddr, - sizeof(pos)); - return pos; + memcpy_fromio(pos, cdev->lpe_ba + stream->info.read_pos_regaddr, sizeof(*pos)); } static u32 catpt_stream_volume(struct catpt_dev *cdev, @@ -615,7 +611,7 @@ catpt_component_pointer(struct snd_soc_component *component, return 0; stream = snd_soc_dai_get_dma_data(cpu_dai, substream); - pos = catpt_stream_read_position(cdev, stream); + catpt_stream_read_position(cdev, stream, &pos); return bytes_to_frames(substream->runtime, pos); }