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 <youwan@nfschina.com> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Hanjun Guo <guohanjun@huawei.com> Link: https://lore.kernel.org/r/20240624023101.369633-1-youwan@nfschina.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent 7a7a1ca commit bfe3f0d

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

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)