Skip to content

Commit bfe3f0d

Browse files
Youwan Wangctmarinas
authored andcommitted
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]>
1 parent 7a7a1ca commit bfe3f0d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/acpi/arm64/amba.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ static const struct acpi_device_id amba_id_list[] = {
2727

2828
static void amba_register_dummy_clk(void)
2929
{
30-
static struct clk *amba_dummy_clk;
31-
32-
/* If clock already registered */
33-
if (amba_dummy_clk)
34-
return;
30+
struct clk *amba_dummy_clk;
3531

3632
amba_dummy_clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, 0, 0);
3733
clk_register_clkdev(amba_dummy_clk, "apb_pclk", NULL);

0 commit comments

Comments
 (0)