clocksource: starfive: Remove struct reset_control
authorLey Foon Tan <leyfoon.tan@linux.starfivetech.com>
Mon, 12 Sep 2022 02:09:27 +0000 (02:09 +0000)
committerXingyu Wu <xingyu.wu@starfivetech.com>
Thu, 15 Sep 2022 02:05:35 +0000 (10:05 +0800)
Remove struct reset_control from starfive_clkevt struct, uses local
struct reset_control instead.

Signed-off-by: Ley Foon Tan <leyfoon.tan@linux.starfivetech.com>
drivers/clocksource/timer-starfive.c
drivers/clocksource/timer-starfive.h

index ea1f41b..62399f8 100755 (executable)
@@ -399,7 +399,6 @@ static int __init do_starfive_timer_of_init(struct device_node *np,
 
                rst = of_reset_control_get(np, name);
                if (!IS_ERR(rst)) {
-                       clkevt->rst = rst;
                        reset_control_assert(rst);
                        reset_control_deassert(rst);
                }
@@ -433,9 +432,9 @@ init_err:
 register_err:
        free_irq(clkevt->irq, &clkevt->evt);
 irq_err:
-       if (!clkevt->rst) {
-               reset_control_assert(clkevt->rst);
-               reset_control_put(clkevt->rst);
+       if (!rst) {
+               reset_control_assert(rst);
+               reset_control_put(rst);
        }
        if (!clkevt->clk) {
                clk_disable_unprepare(clkevt->clk);
index a7fadfa..7315a0f 100755 (executable)
@@ -84,7 +84,6 @@ struct starfive_timer {
 struct starfive_clkevt {
        struct clock_event_device evt;
        struct clk *clk;
-       struct reset_control *rst;
        char name[20];
        int irq;
        u64 periodic;