Re: [PATCH 3/3] leds: leds-lp55xx: Convert mutex lock/unlock to guard API

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

 



…
> +++ b/drivers/leds/leds-lp5521.c
…
> @@ -185,9 +186,9 @@ static ssize_t lp5521_selftest(struct device *dev,
>  	struct lp55xx_chip *chip = led->chip;
>  	int ret;
>
> -	mutex_lock(&chip->lock);
> +	guard(mutex, &chip->lock);

How did you come to the conclusion to try such a syntax variant out?

Would the following statement (with additional parentheses) be more appropriate?

	guard(mutex)(&chip->lock);


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