Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: meson: meson8b: remove spinlock

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>

-7
-7
drivers/clk/meson/meson8b.c
··· 25 25 #include <dt-bindings/clock/meson8b-clkc.h> 26 26 #include <dt-bindings/reset/amlogic,meson8b-clkc-reset.h> 27 27 28 - static DEFINE_SPINLOCK(meson_clk_lock); 29 - 30 28 struct meson8b_clk_reset { 31 29 struct reset_controller_dev reset; 32 30 struct regmap *regmap; ··· 3697 3699 container_of(rcdev, struct meson8b_clk_reset, reset); 3698 3700 const struct meson8b_clk_reset_line *reset; 3699 3701 unsigned int value = 0; 3700 - unsigned long flags; 3701 3702 3702 3703 if (id >= ARRAY_SIZE(meson8b_clk_reset_bits)) 3703 3704 return -EINVAL; ··· 3706 3709 if (assert != reset->active_low) 3707 3710 value = BIT(reset->bit_idx); 3708 3711 3709 - spin_lock_irqsave(&meson_clk_lock, flags); 3710 - 3711 3712 regmap_update_bits(meson8b_clk_reset->regmap, reset->reg, 3712 3713 BIT(reset->bit_idx), value); 3713 - 3714 - spin_unlock_irqrestore(&meson_clk_lock, flags); 3715 3714 3716 3715 return 0; 3717 3716 }