driver core: bus: constify bus_get()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2023 18:29:09 +0000 (19:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Mar 2023 12:21:24 +0000 (13:21 +0100)
commit38370c4e25af7f5670787a1bb1861b289f2ad770
treeb68c7867a78e64877388f4f3ba3ad03c1623155a
parent7c06be04251a0b3349868622a2111a54cbfad8d4
driver core: bus: constify bus_get()

It's funny to think about getting a reference count of a constant
structure pointer, but this locks into place the private data
"underneath" the struct bus_type() which is important to not go away
while we are working with the bus structure for some callbacks.

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