mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 14:33:24 -04:00
ASoC: Intel: catpt: Simplify catpt_stream_find()
Code line reduction and more transparent variable naming. No functional changes. Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260603085827.1964796-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
fa55ad6079
commit
f40e7873cd
@@ -99,19 +99,15 @@ catpt_get_stream_template(struct snd_pcm_substream *substream)
|
||||
}
|
||||
|
||||
/* Caller responsible for holding ->stream_mutex. */
|
||||
struct catpt_stream_runtime *
|
||||
catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id)
|
||||
struct catpt_stream_runtime *catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id)
|
||||
{
|
||||
struct catpt_stream_runtime *pos, *result = NULL;
|
||||
struct catpt_stream_runtime *stream;
|
||||
|
||||
list_for_each_entry(pos, &cdev->stream_list, node) {
|
||||
if (pos->info.stream_hw_id == stream_hw_id) {
|
||||
result = pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
list_for_each_entry(stream, &cdev->stream_list, node)
|
||||
if (stream->info.stream_hw_id == stream_hw_id)
|
||||
return stream;
|
||||
|
||||
return result;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Caller responsible for holding ->stream_mutex. */
|
||||
|
||||
Reference in New Issue
Block a user