From bd17e9e19f8dabaad84b880a083eaf027ed2edf5 Mon Sep 17 00:00:00 2001 From: Tobiasz Dryjanski Date: Fri, 15 Sep 2023 20:10:41 +0200 Subject: [PATCH] buffer: remove buffer_acquire from buffer.c remove buffer ops from buffer.c this is a continuation of changes from commit 4a03699 Signed-off-by: Tobiasz Dryjanski --- src/include/sof/audio/buffer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/include/sof/audio/buffer.h b/src/include/sof/audio/buffer.h index c461d19c6977..874b9fa7e979 100644 --- a/src/include/sof/audio/buffer.h +++ b/src/include/sof/audio/buffer.h @@ -208,13 +208,15 @@ int buffer_set_params(struct comp_buffer *buffer, bool buffer_params_match(struct comp_buffer *buffer, struct sof_ipc_stream_params *params, uint32_t flag); -static inline void buffer_stream_invalidate(struct comp_buffer *buffer, uint32_t bytes) +static inline void buffer_stream_invalidate(struct comp_buffer *buffer, + uint32_t bytes) { if (buffer->is_shared) audio_stream_invalidate(&buffer->stream, bytes); } -static inline void buffer_stream_writeback(struct comp_buffer *buffer, uint32_t bytes) +static inline void buffer_stream_writeback(struct comp_buffer *buffer, + uint32_t bytes) { if (buffer->is_shared) audio_stream_writeback(&buffer->stream, bytes); @@ -249,10 +251,8 @@ void buffer_detach(struct comp_buffer *buffer, struct list_item *head, int dir); static inline struct comp_dev *buffer_get_comp(struct comp_buffer *buffer, int dir) { - struct comp_buffer *buffer_c = buffer_acquire(buffer); - struct comp_dev *comp = dir == PPL_DIR_DOWNSTREAM ? buffer_c->sink : - buffer_c->source; - buffer_release(buffer_c); + struct comp_dev *comp = dir == PPL_DIR_DOWNSTREAM ? buffer->sink : + buffer->source; return comp; }