Commit ce7980ae authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Thomas Gleixner

genirq/irqdesc: Make kobj_type structures constant

Since commit ee6d3dd4 ("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 which prevents
modification at runtime.
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230217-kobj_type-irq-v1-1-fedfacaf8cdb@weissschuh.net
parent e6cc6f17
...@@ -277,7 +277,7 @@ static struct attribute *irq_attrs[] = { ...@@ -277,7 +277,7 @@ static struct attribute *irq_attrs[] = {
}; };
ATTRIBUTE_GROUPS(irq); ATTRIBUTE_GROUPS(irq);
static struct kobj_type irq_kobj_type = { static const struct kobj_type irq_kobj_type = {
.release = irq_kobj_release, .release = irq_kobj_release,
.sysfs_ops = &kobj_sysfs_ops, .sysfs_ops = &kobj_sysfs_ops,
.default_groups = irq_groups, .default_groups = irq_groups,
...@@ -335,7 +335,7 @@ postcore_initcall(irq_sysfs_init); ...@@ -335,7 +335,7 @@ postcore_initcall(irq_sysfs_init);
#else /* !CONFIG_SYSFS */ #else /* !CONFIG_SYSFS */
static struct kobj_type irq_kobj_type = { static const struct kobj_type irq_kobj_type = {
.release = irq_kobj_release, .release = irq_kobj_release,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment