]> git.itanic.dy.fi Git - linux-stable/commit
driver core: add local subsys_get and subsys_put functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 11:13:10 +0000 (12:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 09:42:57 +0000 (10:42 +0100)
commit789be03a600842ef461968cc5a2d458f51f319b2
tree931ba69e3827398471652589432ab138a0f0584e
parentfb42378dcc7f247df56f0ecddfdae85487495fbc
driver core: add local subsys_get and subsys_put functions

We need to control the reference count of the subsys private structure
instead of directly manipulating the kset reference count of it, so wrap
that logic up in a subsys_get() and subsys_put() function to make it more
obvious as to what is happening.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230208111330.439504-2-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/base.h