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

Configure Feed

Select the types of activity you want to include in your feed.

pwm: brcmstb: Remove useless locking

The lock only protects against concurrent users of the PWM API. This is not
expected to be necessary. And if there was such an issue, this is better
handled in the PWM core instead as it affects all drivers in the same way.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Uwe Kleine-König and committed by
Thierry Reding
0d6bc3e1 0dcfafe7

-7
-7
drivers/pwm/pwm-brcmstb.c
··· 53 53 54 54 struct brcmstb_pwm { 55 55 void __iomem *base; 56 - spinlock_t lock; 57 56 struct clk *clk; 58 57 struct pwm_chip chip; 59 58 }; ··· 158 159 * generator output a base frequency for the constant frequency 159 160 * generator to derive from. 160 161 */ 161 - spin_lock(&p->lock); 162 162 brcmstb_pwm_writel(p, cword >> 8, PWM_CWORD_MSB(channel)); 163 163 brcmstb_pwm_writel(p, cword & 0xff, PWM_CWORD_LSB(channel)); 164 164 ··· 169 171 /* Configure on and period value */ 170 172 brcmstb_pwm_writel(p, pc, PWM_PERIOD(channel)); 171 173 brcmstb_pwm_writel(p, dc, PWM_ON(channel)); 172 - spin_unlock(&p->lock); 173 174 174 175 return 0; 175 176 } ··· 179 182 unsigned int shift = channel * CTRL_CHAN_OFFS; 180 183 u32 value; 181 184 182 - spin_lock(&p->lock); 183 185 value = brcmstb_pwm_readl(p, PWM_CTRL); 184 186 185 187 if (enable) { ··· 190 194 } 191 195 192 196 brcmstb_pwm_writel(p, value, PWM_CTRL); 193 - spin_unlock(&p->lock); 194 197 } 195 198 196 199 static int brcmstb_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, ··· 237 242 p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL); 238 243 if (!p) 239 244 return -ENOMEM; 240 - 241 - spin_lock_init(&p->lock); 242 245 243 246 p->clk = devm_clk_get(&pdev->dev, NULL); 244 247 if (IS_ERR(p->clk)) {