Re: [PATCH v8 15/20] leds: leds-lp55xx: Generalize sysfs engine_load and engine_mode

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

 



…
> +++ b/drivers/leds/leds-lp55xx-common.c
…
> +ssize_t lp55xx_store_engine_load(struct device *dev,
> +				 struct device_attribute *attr,
> +				 const char *buf, size_t len, int nr)
…
> +	mutex_lock(&chip->lock);
> +
> +	chip->engine_idx = nr;
> +	lp55xx_load_engine(chip);
> +	ret = lp55xx_update_program_memory(chip, buf, len);
> +
> +	mutex_unlock(&chip->lock);
> +
> +	return ret;
> +}
…

Under which circumstances 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]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux