]> Git Repo - linux.git/commitdiff
clk: meson: meson8b: remove spinlock
authorJerome Brunet <[email protected]>
Wed, 25 Sep 2024 15:49:48 +0000 (17:49 +0200)
committerJerome Brunet <[email protected]>
Mon, 30 Sep 2024 09:28:01 +0000 (11:28 +0200)
The spinlock in meson8b clock controller is now only protecting a call to
regmap_update_bits().

The regmap API already has its own locking system so this spinlock
is redundant. Remove it.

Reviewed-by: Martin Blumenstingl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[jbrunet: amended to remove unused variable as reported by lkp]
Signed-off-by: Jerome Brunet <[email protected]>
drivers/clk/meson/meson8b.c

index 5011768c0f4e04904a91947aba2029af188f1e3b..e4b474c5f86ce37664200209d7765d36b9542248 100644 (file)
@@ -25,8 +25,6 @@
 #include <dt-bindings/clock/meson8b-clkc.h>
 #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h>
 
-static DEFINE_SPINLOCK(meson_clk_lock);
-
 struct meson8b_clk_reset {
        struct reset_controller_dev reset;
        struct regmap *regmap;
@@ -3699,7 +3697,6 @@ static int meson8b_clk_reset_update(struct reset_controller_dev *rcdev,
                container_of(rcdev, struct meson8b_clk_reset, reset);
        const struct meson8b_clk_reset_line *reset;
        unsigned int value = 0;
-       unsigned long flags;
 
        if (id >= ARRAY_SIZE(meson8b_clk_reset_bits))
                return -EINVAL;
@@ -3709,13 +3706,9 @@ static int meson8b_clk_reset_update(struct reset_controller_dev *rcdev,
        if (assert != reset->active_low)
                value = BIT(reset->bit_idx);
 
-       spin_lock_irqsave(&meson_clk_lock, flags);
-
        regmap_update_bits(meson8b_clk_reset->regmap, reset->reg,
                           BIT(reset->bit_idx), value);
 
-       spin_unlock_irqrestore(&meson_clk_lock, flags);
-
        return 0;
 }
 
This page took 0.065574 seconds and 4 git commands to generate.