Re: [PATCH 5/5] leds: trigger: netdev: use mutex instead of spinlocks

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

 



On Wed, Apr 19, 2023 at 11:07:43PM +0200, Christian Marangi wrote:
> Some LEDs may require to sleep while doing some operation like setting
> brightness and other cleanup.
> 
> For this reason, using a spinlock will cause a sleep under spinlock
> warning.
> 
> It should be safe to convert this to a sleepable lock since:
> - sysfs read/write can sleep
> - netdev_trig_work is a work queue and can sleep
> - netdev _trig_notify can sleep
> 
> The spinlock was used when brightness didn't support sleeping, but this
> changed and now it supported with brightness_set_blocking().
> 
> Convert to mutex lock to permit sleeping using brightness_set_blocking().
> 
> Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

    Andrew



[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