From: Michal Simek Date: Tue, 10 Jan 2017 15:16:48 +0100 Subject: [U-Boot] [PATCH 5/8] zynq: Remove zynq_clk_get_name function In-Reply-To: <1483532844-20649-6-git-send-email-stefan.herbrechtsmeier@weidmueller.com> References: <1483532844-20649-1-git-send-email-stefan.herbrechtsmeier@weidmueller.com> <1483532844-20649-6-git-send-email-stefan.herbrechtsmeier@weidmueller.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4.1.2017 13:27, stefan.herbrechtsmeier at weidmueller.com wrote: > From: Stefan Herbrechtsmeier > > 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 > --- > > arch/arm/mach-zynq/clk.c | 12 +----------- > arch/arm/mach-zynq/include/mach/clk.h | 1 - > 2 files changed, 1 insertion(+), 12 deletions(-) > > diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c > index 7bff964..570ebd7 100644 > --- a/arch/arm/mach-zynq/clk.c > +++ b/arch/arm/mach-zynq/clk.c > @@ -632,16 +632,6 @@ int zynq_clk_set_rate(enum zynq_clk clk, unsigned long rate) > } > > /** > - * 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 250c5bc..5c2758a 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 > Reviewed-by: Michal Simek Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: