Skip to content

Commit

Permalink
clk: meson: meson8b: remove spinlock
Browse files Browse the repository at this point in the history
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 <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20240925-clk-meson8b-spinlock-v1-1-50b7f2d02d7d@baylibre.com
[jbrunet: amended to remove unused variable as reported by lkp]
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
  • Loading branch information
Jerome Brunet committed Sep 30, 2024
1 parent bbf7e40 commit 1d7ec62
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/clk/meson/meson8b.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit 1d7ec62

Please sign in to comment.