devm_delayed...k_autocancel(9)
β¨ devm_delayed_work_autocancel β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual π
this page is literally all about devm_delayed_work_autocancel, and ngl it's kind of a glow-up for delayed work. stay with me π«Ά
πΈ NAME πΈ
devm_delayed_work_autocancel β resource-managed delayed work allocation β¨
π¦ SYNOPSIS π¦
int devm_delayed_work_autocancel (struct device *dev , struct
delayed_work *w , work_func_t worker );
like, that's the whole signature, no cap π₯
π ARGUMENTS π
devβ the device whose lifetime the work is bound to π it's giving "this work belongs to you, bestie"wβ the work item to be queued πworkerβ the worker function π§
π DESCRIPTION π
so the vibe here is: this initializes delayed work that gets automatically cancelled when the driver is detached β¨ iconic behaviour, honestly.
a few drivers need delayed work that must be cancelled before the driver is detached, to avoid accessing removed resources π like, you do NOT want your work touching stuff that's already gone. that's the danger zone, fr fr.
devm_delayed_work_autocancel can be used to omit the explicit cancellation when the driver is detached π
so you don't have to write the cleanup yourself β it's handled. slay.
π SEE ALSO π
- Kernel file
./include/linux/devm-helpers.hπ devm_work_autocancel(9)π₯
π SIGN-OFF π
and that's the whole page, bestie! this one comes to you from ./include/linux, dated October 2026 π go forth and let the devm handle your cleanup, periodt πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms