LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Scally <djrscally@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, rafael@kernel.org,
andriy.shevchenko@linux.intel.com,
laurent.pinchart@ideasonboard.com
Subject: [PATCH 2/2] Revert "media: device property: Call fwnode_graph_get_endpoint_by_id() for fwnode->secondary"
Date: Thu, 22 Jul 2021 21:19:29 +0100 [thread overview]
Message-ID: <20210722201929.3585671-3-djrscally@gmail.com> (raw)
In-Reply-To: <20210722201929.3585671-1-djrscally@gmail.com>
This reverts commit acd418bfcfc415cf5e6414b6d1c6acfec850f290. Checking for
endpoints against fwnode->secondary in fwnode_graph_get_next_endpoint() is
a better way to do this since that function is also used in a bunch of
other places, for instance sensor drivers checking that they do have an
endpoint connected during probe.
Signed-off-by: Daniel Scally <djrscally@gmail.com>
---
drivers/base/property.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/base/property.c b/drivers/base/property.c
index e3aceb3a9a0d..689276fb0e45 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -1234,14 +1234,7 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
best_ep_id = fwnode_ep.id;
}
- if (best_ep)
- return best_ep;
-
- if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary))
- return fwnode_graph_get_endpoint_by_id(fwnode->secondary, port,
- endpoint, flags);
-
- return NULL;
+ return best_ep;
}
EXPORT_SYMBOL_GPL(fwnode_graph_get_endpoint_by_id);
--
2.25.1
next prev parent reply other threads:[~2021-07-22 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 20:19 [PATCH 0/2] Check for endpoints in fwnode->secondary more sensibly Daniel Scally
2021-07-22 20:19 ` [PATCH 1/2] device property: Check fwnode->secondary in fwnode_graph_get_next_endpoint() Daniel Scally
2021-07-23 12:32 ` Andy Shevchenko
2021-07-23 13:04 ` Daniel Scally
2021-07-30 11:34 ` Andy Shevchenko
2021-07-31 21:36 ` Daniel Scally
2021-07-22 20:19 ` Daniel Scally [this message]
2021-07-23 12:33 ` [PATCH 0/2] Check for endpoints in fwnode->secondary more sensibly Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210722201929.3585671-3-djrscally@gmail.com \
--to=djrscally@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--subject='Re: [PATCH 2/2] Revert "media: device property: Call fwnode_graph_get_endpoint_by_id() for fwnode->secondary"' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).