platform/x86: make fw_attr_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 18:55:04 +0000 (15:55 -0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Mar 2024 10:48:13 +0000 (12:48 +0200)
commit5878e5b760b6fcf7bc00dec085ba2b439a929871
tree435e735eb031f85319d20677faa1f3776de906d0
parent57221a07ff37ff356f9265acd228bc3c8744c8fc
platform/x86: make fw_attr_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the fw_attr_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

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/20240305-class_cleanup-platform-v1-1-9085c97b9355@marliere.net
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
drivers/platform/x86/firmware_attributes_class.c
drivers/platform/x86/firmware_attributes_class.h
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
drivers/platform/x86/think-lmi.c