mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
platform/wmi: Make wmi_bus_class const
The functions class_register()/_unregister() and device_create() both support taking a const pointer to the class struct. Use this to mark wmi_bus_class as const so that it can be placed into read-only memory for better security. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20260610203453.816254-8-W_Armin@gmx.de Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
committed by
Ilpo Järvinen
parent
ab1eb37dd6
commit
b79ad5e8ba
@@ -1088,7 +1088,7 @@ static void wmi_dev_shutdown(struct device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
static struct class wmi_bus_class = {
|
||||
static const struct class wmi_bus_class = {
|
||||
.name = "wmi_bus",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user