Skip to content

Commit 49f39cb

Browse files
Sakari Ailusrafaeljw
authored andcommitted
device property: Fix documentation for FWNODE_GRAPH_DEVICE_DISABLED
FWNODE_GRAPH_DEVICE_DISABLED flag was meant for also returning endpoints connected to disabled devices, but it also may return endpoints that are not connected. Fix this in documentation. Also fwnode_graph_get_endpoint_by_id() was affeced by this. Also improve the language a little bit. Fixes: 0fcc2bd ("device property: Add fwnode_graph_get_endpoint_by_id()") Signed-off-by: Sakari Ailus <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4a7f411 commit 49f39cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/base/property.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,8 @@ EXPORT_SYMBOL_GPL(fwnode_graph_get_remote_node);
10631063
* has not been found, look for the closest endpoint ID greater than the
10641064
* specified one and return the endpoint that corresponds to it, if present.
10651065
*
1066-
* Do not return endpoints that belong to disabled devices, unless
1067-
* FWNODE_GRAPH_DEVICE_DISABLED is passed in @flags.
1066+
* Does not return endpoints that belong to disabled devices or endpoints that
1067+
* are unconnected, unless FWNODE_GRAPH_DEVICE_DISABLED is passed in @flags.
10681068
*
10691069
* The returned endpoint needs to be released by calling fwnode_handle_put() on
10701070
* it when it is not needed any more.

include/linux/property.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,8 @@ static inline bool fwnode_graph_is_endpoint(struct fwnode_handle *fwnode)
414414
* one.
415415
* @FWNODE_GRAPH_DEVICE_DISABLED: That the device to which the remote
416416
* endpoint of the given endpoint belongs to,
417-
* may be disabled.
417+
* may be disabled, or that the endpoint is not
418+
* connected.
418419
*/
419420
#define FWNODE_GRAPH_ENDPOINT_NEXT BIT(0)
420421
#define FWNODE_GRAPH_DEVICE_DISABLED BIT(1)

0 commit comments

Comments
 (0)