driver core: soc: remove layering violation for the soc_bus
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Jan 2023 17:10:59 +0000 (18:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2023 08:09:53 +0000 (09:09 +0100)
commit90be1f15c39858a4f0f4346c39fa150697d231c1
treea6fb56b9d7242493b98cc07ea613e1f226f84f62
parentb7810ea80ff0e1f7035c87296eb5ec77e4c13ec7
driver core: soc: remove layering violation for the soc_bus

The soc_bus code pokes around in the internal bus structures assuming
that it "knows" if a field is not set that it has not been registered
yet.  That isn't a safe assumption, so just remove the layering
violation entirely and keep track if the bus has been registered or not
ourselves.

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20230130171059.1784057-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/soc.c