driver core: class.c: convert to only use class_to_subsys
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Mar 2023 19:42:34 +0000 (20:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Mar 2023 05:55:10 +0000 (07:55 +0200)
commit7b884b7f24b42fa25e92ed724ad82f137610afaf
treeb0aee6968307d3dd6c55d4923ceeecd75669a15f
parent884f8ce42ccec9d0bf11d8bf9f111e5961ca1c82
driver core: class.c: convert to only use class_to_subsys

Now that class_to_subsys() can be used to get access to the internal
class private pointer, convert the remaining few places in class.c that
were accessing the pointer directly to use class_to_subsys() instead.

By doing this, the need for class_get() and class_put() goes away as no
one actually tries to increment the class structures anymore, only the
internal dynamic one.

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