]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: Rename clk_get_optional_nodev
authorSean Anderson <seanga2@gmail.com>
Wed, 22 Dec 2021 17:11:10 +0000 (12:11 -0500)
committerSean Anderson <seanga2@gmail.com>
Fri, 25 Feb 2022 04:58:13 +0000 (23:58 -0500)
This normalizes the name of this accessor function to put "_optional" last.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20211222171114.3091780-2-seanga2@gmail.com
drivers/clk/clk-uclass.c
drivers/phy/phy-mtk-tphy.c
include/clk.h

index d245b672fae91759d3197f4dbbc21c325ac63cac..9aa51895b3d4178abb0e74e75e6c3d2c9802dab7 100644 (file)
@@ -432,7 +432,8 @@ int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
        return clk_get_by_index_nodev(node, index, clk);
 }
 
-int clk_get_optional_nodev(ofnode node, const char *name, struct clk *clk)
+int clk_get_by_name_nodev_optional(ofnode node, const char *name,
+                                  struct clk *clk)
 {
        int ret;
 
index 824244b85281cf9539e944a862f2e5f6bb028073..2dd964f7b20208c136449cfc28e7222e0461ac06 100644 (file)
@@ -723,13 +723,13 @@ static int mtk_tphy_probe(struct udevice *dev)
                tphy->phys[index] = instance;
                index++;
 
-               err = clk_get_optional_nodev(subnode, "ref",
-                                            &instance->ref_clk);
+               err = clk_get_by_name_nodev_optional(subnode, "ref",
+                                                    &instance->ref_clk);
                if (err)
                        return err;
 
-               err = clk_get_optional_nodev(subnode, "da_ref",
-                                            &instance->da_ref_clk);
+               err = clk_get_by_name_nodev_optional(subnode, "da_ref",
+                                                    &instance->da_ref_clk);
                if (err)
                        return err;
        }
index 040d2d60f7ad3038cb14b840f59518b911967a90..a8225eec72af39c5edf2d8220ce09993c17ac3b8 100644 (file)
@@ -194,7 +194,7 @@ int clk_get_by_name(struct udevice *dev, const char *name, struct clk *clk);
 int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk);
 
 /**
- * clk_get_optional_nodev - Get/request an optinonal clock by name
+ * clk_get_by_name_nodev_optional - Get/request an optinonal clock by name
  *             without a device.
  * @node:      The client ofnode.
  * @name:      The name of the clock to request.
@@ -206,7 +206,8 @@ int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk);
  * no clock producer, in this case, skip the error number -ENODATA, and
  * the function returns 0.
  */
-int clk_get_optional_nodev(ofnode node, const char *name, struct clk *clk);
+int clk_get_by_name_nodev_optional(ofnode node, const char *name,
+                                  struct clk *clk);
 
 /**
  * devm_clk_get - lookup and obtain a managed reference to a clock producer.
@@ -291,7 +292,7 @@ clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
 }
 
 static inline int
-clk_get_optional_nodev(ofnode node, const char *name, struct clk *clk)
+clk_get_by_name_nodev_optional(ofnode node, const char *name, struct clk *clk)
 {
        return -ENOSYS;
 }