platform: x86: ibm_rtl: make rtl_subsys const

Now that the driver core can properly handle constant struct bus_type,
move the rtl_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-platform-drivers-x86-v1-2-1f0839b385c6@marliere.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Ricardo B. Marliere 2024-02-04 11:40:17 -03:00 committed by Ilpo Järvinen
parent 10fdfd13a3
commit 41b43c7512
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -179,7 +179,7 @@ static ssize_t rtl_set_state(struct device *dev,
return ret;
}
static struct bus_type rtl_subsys = {
static const struct bus_type rtl_subsys = {
.name = "ibm_rtl",
.dev_name = "ibm_rtl",
};