]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
devres: add devres_node_add()
authorDanilo Krummrich <dakr@kernel.org>
Mon, 2 Feb 2026 23:48:15 +0000 (00:48 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 17 Mar 2026 20:23:02 +0000 (21:23 +0100)
commit4796dfd7e0e845de5e76b1748d3c022d350f1b57
tree7426cf731410b71f7cd41a7becb7c3bf4dcfac64
parentf813ec9e84b4d0ca81ec1da94ab07bfb4a29266c
devres: add devres_node_add()

Both devres_add() and devres_open_group() acquire the devres_lock and
call add_dr(). Add a helper, devres_node_add(), for this pattern.

Use guard(spinlock_irqsave) to avoid the explicit unlock call and local
flag variables.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260202235210.55176-3-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/base/devres.c