diff mbox series

clk: meson: meson8b: remove spinlock

Message ID 20240925-clk-meson8b-spinlock-v1-1-50b7f2d02d7d@baylibre.com (mailing list archive)
State New, archived
Headers show
Series clk: meson: meson8b: remove spinlock | expand

Commit Message

Jerome Brunet Sept. 25, 2024, 3:49 p.m. UTC
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.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/clk/meson/meson8b.c | 6 ------
 1 file changed, 6 deletions(-)


---
base-commit: b7fadc62b8d700e14787d26345379e95c86e1684
change-id: 20240925-clk-meson8b-spinlock-abf4cfb22796

Best regards,

Comments

Martin Blumenstingl Sept. 25, 2024, 5:04 p.m. UTC | #1
On Wed, Sep 25, 2024 at 5:49 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
>
> 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.
Thank you Jerome!

> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Jerome Brunet Sept. 26, 2024, 12:39 p.m. UTC | #2
Applied to clk-meson (clk-meson-next), thanks!

[1/1] clk: meson: meson8b: remove spinlock
      https://github.com/BayLibre/clk-meson/commit/e736da1956cf

Best regards,
--
Jerome
diff mbox series

Patch

diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index 5011768c0f4e..96358bc054b5 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -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;
@@ -3709,13 +3707,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;
 }