mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-18 12:59:06 -05:00
platform: x86: wmi: make wmi_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the wmi_bus_type 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> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20240204-bus_cleanup-platform-drivers-x86-v1-1-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:
committed by
Ilpo Järvinen
parent
3a057bf30e
commit
10fdfd13a3
@@ -219,7 +219,7 @@ static int wmidev_match_guid(struct device *dev, const void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct bus_type wmi_bus_type;
|
||||
static const struct bus_type wmi_bus_type;
|
||||
|
||||
static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
|
||||
{
|
||||
@@ -899,7 +899,7 @@ static struct class wmi_bus_class = {
|
||||
.name = "wmi_bus",
|
||||
};
|
||||
|
||||
static struct bus_type wmi_bus_type = {
|
||||
static const struct bus_type wmi_bus_type = {
|
||||
.name = "wmi",
|
||||
.dev_groups = wmi_groups,
|
||||
.match = wmi_dev_match,
|
||||
|
||||
Reference in New Issue
Block a user