mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02: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:
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. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user