summaryrefslogtreecommitdiff
path: root/drivers/acpi/device_sysfs.c
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-14 06:23:52 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-02-14 17:52:37 +0300
commita527b0111798ed7b9f49830989eaabfe537e09ef (patch)
tree55e3d3d88bca6ef6fffb65112737ee4488c50cd5 /drivers/acpi/device_sysfs.c
parent446c85af665cf6d911c4821ac9507c8ba0cc7e75 (diff)
downloadlinux-a527b0111798ed7b9f49830989eaabfe537e09ef.tar.xz
ACPI: make kobj_type structures constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definitions to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/device_sysfs.c')
-rw-r--r--drivers/acpi/device_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 120873dad2cc..c3aa15571f16 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -78,7 +78,7 @@ static void acpi_data_node_release(struct kobject *kobj)
complete(&dn->kobj_done);
}
-static struct kobj_type acpi_data_node_ktype = {
+static const struct kobj_type acpi_data_node_ktype = {
.sysfs_ops = &acpi_data_node_sysfs_ops,
.default_groups = acpi_data_node_default_groups,
.release = acpi_data_node_release,