aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouwan Wang <[email protected]>2024-06-24 10:31:01 +0800
committerCatalin Marinas <[email protected]>2024-06-24 18:36:07 +0100
commitbfe3f0df3e3c0afdbe147d2479fe9aee4d0683e9 (patch)
tree4b403152ddede0c9101e9a3545ae522b289f1b62
parent7a7a1cac3c2f5e3c859efb295bad3469e09e6f8f (diff)
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: Youwan Wang <[email protected]> Acked-by: Sudeep Holla <[email protected]> Acked-by: Hanjun Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
-rw-r--r--drivers/acpi/arm64/amba.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c
index e1f0bbb8f393..1350083bce5f 100644
--- a/drivers/acpi/arm64/amba.c
+++ b/drivers/acpi/arm64/amba.c
@@ -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);