The led layer uses a combination of timer and worker for periodic led updates, e.g. for blinking. The reason seems to be that blocking operations like a usb read are not allowed in a timer handler. Replace the combination of timer and worker with a delayed worker. Convert the timeout defines from milliseconds to jiffies to make them usable as delays for the delayed worker. Shorten the names of the defines and rename the work item to make checkpatch happy. Other layers may call SwLedControlMode1 to update the led state. Such an update may result in cancelling the delayed worker. SwLedControlMode1 might be called in interrupt context, we must use cancel_delayed_work to cancel the worker. cancel_delayed_work_sync waits until the worker is finished, this is not allowed in interrupt context. DeInitLed871x is called when the driver is removed or when the system goes into standby. We may use cancel_delayed_work_sync here to cancel the delayed worker. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211126114135.18228-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Description
Languages
C
97.6%
Assembly
1%
Shell
0.5%
Python
0.3%
Makefile
0.3%