From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Date: Tue, 17 Jan 2017 15:27:28 +0000 (+0100)
Subject: zynq: Remove zynq_clk_get_name function
X-Git-Tag: v2025.01-rc5-pxa1908~7404^2~5
X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=f96fccba7152dac3e83bfe3366932b9d78a98293;p=u-boot.git

zynq: Remove zynq_clk_get_name function

The zynq_clk_get_name function is only used once inside the clock
driver. Replace the function call with the one-line code.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 7bff964d0b..570ebd73aa 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -631,16 +631,6 @@ int zynq_clk_set_rate(enum zynq_clk clk, unsigned long rate)
 	return -ENXIO;
 }
 
-/**
- * zynq_clk_get_name() - Get clock name
- * @clk:	Clock identifier
- * Returns the name of @clk.
- */
-const char *zynq_clk_get_name(enum zynq_clk clk)
-{
-	return clk_names[clk];
-}
-
 /**
  * soc_clk_dump() - Print clock frequencies
  * Returns zero on success
@@ -653,7 +643,7 @@ int soc_clk_dump(void)
 
 	printf("clk\t\tfrequency\n");
 	for (i = 0; i < clk_max; i++) {
-		const char *name = zynq_clk_get_name(i);
+		const char *name = clk_names[i];
 		if (name)
 			printf("%10s%20lu\n", name, zynq_clk_get_rate(i));
 	}
diff --git a/arch/arm/mach-zynq/include/mach/clk.h b/arch/arm/mach-zynq/include/mach/clk.h
index 250c5bc07b..5c2758aee2 100644
--- a/arch/arm/mach-zynq/include/mach/clk.h
+++ b/arch/arm/mach-zynq/include/mach/clk.h
@@ -23,7 +23,6 @@ enum zynq_clk {
 void zynq_clk_early_init(void);
 int zynq_clk_set_rate(enum zynq_clk clk, unsigned long rate);
 unsigned long zynq_clk_get_rate(enum zynq_clk clk);
-const char *zynq_clk_get_name(enum zynq_clk clk);
 unsigned long get_uart_clk(int dev_id);
 
 #endif