diff options
| author | Armin Wolf <W_Armin@gmx.de> | 2026-06-10 22:34:51 +0200 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-06-12 16:01:52 +0300 |
| commit | b79ad5e8ba5cfda93a83e0cf71d4743829cc9f83 (patch) | |
| tree | c0033cb7f1ef57c9c613239ebc002574fe8477c7 /drivers/platform | |
| parent | ab1eb37dd63ff3555e4f98918f1bd3498522f765 (diff) | |
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>
Diffstat (limited to 'drivers/platform')
| -rw-r--r-- | drivers/platform/wmi/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/wmi/core.c b/drivers/platform/wmi/core.c index 5a2ffcbab6af..0782ebc33c00 100644 --- a/drivers/platform/wmi/core.c +++ b/drivers/platform/wmi/core.c @@ -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", }; |
