[PATCH 11/18] dm: core: Use 'uclass_driver' for the uclass linker_list

Simon Glass sjg at chromium.org
Wed Dec 16 16:24:59 CET 2020


At present the name 'uclass_driver' is used for the uclass linker list.
This does not follow the convention of using the struct name. Fix it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/core/lists.c | 4 ++--
 drivers/core/root.c  | 4 ++--
 include/dm/uclass.h  | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index b23ee3030e5..426444db3a9 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -39,8 +39,8 @@ struct driver *lists_driver_lookup_name(const char *name)
 struct uclass_driver *lists_uclass_lookup(enum uclass_id id)
 {
 	struct uclass_driver *uclass =
-		ll_entry_start(struct uclass_driver, uclass);
-	const int n_ents = ll_entry_count(struct uclass_driver, uclass);
+		ll_entry_start(struct uclass_driver, uclass_driver);
+	const int n_ents = ll_entry_count(struct uclass_driver, uclass_driver);
 	struct uclass_driver *entry;
 
 	for (entry = uclass; entry != uclass + n_ents; entry++) {
diff --git a/drivers/core/root.c b/drivers/core/root.c
index f2fba5883aa..9ef242979ba 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -86,8 +86,8 @@ void fix_drivers(void)
 void fix_uclass(void)
 {
 	struct uclass_driver *uclass =
-		ll_entry_start(struct uclass_driver, uclass);
-	const int n_ents = ll_entry_count(struct uclass_driver, uclass);
+		ll_entry_start(struct uclass_driver, uclass_driver);
+	const int n_ents = ll_entry_count(struct uclass_driver, uclass_driver);
 	struct uclass_driver *entry;
 
 	for (entry = uclass; entry != uclass + n_ents; entry++) {
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index a9b23727019..897ab7c55b5 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -112,7 +112,7 @@ struct uclass_driver {
 
 /* Declare a new uclass_driver */
 #define UCLASS_DRIVER(__name)						\
-	ll_entry_declare(struct uclass_driver, __name, uclass)
+	ll_entry_declare(struct uclass_driver, __name, uclass_driver)
 
 /**
  * uclass_get() - Get a uclass based on an ID, creating it if needed
-- 
2.29.2.684.gfbc64c5ab5-goog



More information about the U-Boot mailing list