mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
firmware: arm_scmi: Convert to list_for_each_entry()
Simplify the loop in scmi_handle_get() by using list_for_each_entry(). Suggested-by: Marek Vasut <marek.vasut@mailbox.org> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/bccbd4a64ef4619afd5454e9e533073b00aeaba6.1775205358.git.geert+renesas@glider.be Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
This commit is contained in:
parent
5be6732f82
commit
145728fb61
|
|
@ -2552,13 +2552,11 @@ static bool scmi_is_transport_atomic(const struct scmi_handle *handle,
|
|||
*/
|
||||
static struct scmi_handle *scmi_handle_get(struct device *dev)
|
||||
{
|
||||
struct list_head *p;
|
||||
struct scmi_info *info;
|
||||
struct scmi_handle *handle = NULL;
|
||||
|
||||
mutex_lock(&scmi_list_mutex);
|
||||
list_for_each(p, &scmi_list) {
|
||||
info = list_entry(p, struct scmi_info, node);
|
||||
list_for_each_entry(info, &scmi_list, node) {
|
||||
if (dev->parent == info->dev) {
|
||||
info->users++;
|
||||
handle = &info->handle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user