Re: [PATCH v7 10/20] leds: leds-lp55xx: Generalize led_brightness function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



…
> +++ b/drivers/leds/leds-lp55xx-common.c
> @@ -242,6 +242,20 @@ void lp55xx_firmware_loaded_cb(struct lp55xx_chip *chip)
…
> +int lp55xx_led_brightness(struct lp55xx_led *led)
> +{
…
> +	mutex_lock(&chip->lock);
> +	ret = lp55xx_write(chip, cfg->reg_led_pwm_base.addr + led->chan_nr,
> +			   led->brightness);
> +	mutex_unlock(&chip->lock);
> +	return ret;
> +}
…

Would you become interested to apply a statement like “guard(mutex)(&chip->lock);”?
https://elixir.bootlin.com/linux/v6.10-rc5/source/include/linux/mutex.h#L196

Regards,
Markus





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux