summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/hp
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-03-05 21:55:04 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-03-12 13:48:13 +0300
commit5878e5b760b6fcf7bc00dec085ba2b439a929871 (patch)
tree435e735eb031f85319d20677faa1f3776de906d0 /drivers/platform/x86/hp
parent57221a07ff37ff356f9265acd228bc3c8744c8fc (diff)
downloadlinux-5878e5b760b6fcf7bc00dec085ba2b439a929871.tar.xz
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>
Diffstat (limited to 'drivers/platform/x86/hp')
-rw-r--r--drivers/platform/x86/hp/hp-bioscfg/bioscfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
index 8c9f4f3227fc..2dc50152158a 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -24,7 +24,7 @@ struct bioscfg_priv bioscfg_drv = {
.mutex = __MUTEX_INITIALIZER(bioscfg_drv.mutex),
};
-static struct class *fw_attr_class;
+static const struct class *fw_attr_class;
ssize_t display_name_language_code_show(struct kobject *kobj,
struct kobj_attribute *attr,