summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2022-04-24 23:30:59 -0600
committerTom Rini <[email protected]>2022-04-25 10:00:03 -0400
commit6aa4fe39122a85ce1ef559139518fa5042406186 (patch)
treeeaf85bd156690a2fd2ab9a77e92ce31c53f2b35a /include
parent8565efd509236dc7d4e766de39edae2cefb10057 (diff)
dm: core: Rename and fix uclass_get_by_name_len()
It seems that namelen is more common in U-Boot. Rename this function to fit in better. Also fix a bug where it breaks the operation of uclass_get_by_name() and add a test. Signed-off-by: Simon Glass <[email protected]> Reported-by: Patrick Delaunay <[email protected]> Reported-by: Tim Harvey <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/dm/uclass.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index aafe6522886..f6c0110b061 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -173,13 +173,13 @@ int uclass_get(enum uclass_id key, struct uclass **ucp);
const char *uclass_get_name(enum uclass_id id);
/**
- * uclass_get_by_name_len() - Look up a uclass by its partial driver name
+ * uclass_get_by_namelen() - Look up a uclass by its driver name
*
* @name: Name to look up
- * @len: Length of the partial name
+ * @len: Length of @name (the uclass driver name must have the same length)
* Return: the associated uclass ID, or UCLASS_INVALID if not found
*/
-enum uclass_id uclass_get_by_name_len(const char *name, int len);
+enum uclass_id uclass_get_by_namelen(const char *name, int len);
/**
* uclass_get_by_name() - Look up a uclass by its driver name