Commit bfe3f0df authored by Youwan Wang's avatar Youwan Wang Committed by Catalin Marinas

ACPI / amba: Drop unnecessary check for registered amba_dummy_clk

amba_register_dummy_clk() is called only once from acpi_amba_init()
and acpi_amba_init() itself is called once during the initialisation.
amba_dummy_clk can't be initialised before this in any other code
path and hence the check for already registered amba_dummy_clk is
not necessary. Drop the same.
Signed-off-by: default avatarYouwan Wang <youwan@nfschina.com>
Acked-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Acked-by: default avatarHanjun Guo <guohanjun@huawei.com>
Link: https://lore.kernel.org/r/20240624023101.369633-1-youwan@nfschina.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 7a7a1cac
......@@ -27,11 +27,7 @@ static const struct acpi_device_id amba_id_list[] = {
static void amba_register_dummy_clk(void)
{
static struct clk *amba_dummy_clk;
/* If clock already registered */
if (amba_dummy_clk)
return;
struct clk *amba_dummy_clk;
amba_dummy_clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, 0, 0);
clk_register_clkdev(amba_dummy_clk, "apb_pclk", NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment