]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Use 'uclass_driver' for the uclass linker_list
authorSimon Glass <sjg@chromium.org>
Wed, 23 Dec 2020 02:30:23 +0000 (19:30 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Jan 2021 19:24:40 +0000 (12:24 -0700)
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@chromium.org>
drivers/core/lists.c
drivers/core/root.c
include/dm/uclass.h

index b23ee3030e5861e90e88008eae96c68374cd4d90..426444db3a9986e53b7f619b5007f7c32d19b744 100644 (file)
@@ -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++) {
index f2fba5883aae1f2de6e768743f5608203fce2e04..9ef242979baef3ebc32cee48e6ac41a54552928a 100644 (file)
@@ -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++) {
index 91edbfb47d4265a3998f43af4667daa3e8c128b7..fde08fe157abb35071921984d1010e5076ba27ca 100644 (file)
@@ -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