summaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-17 04:16:25 +0100
committerThomas Gleixner <tglx@linutronix.de>2023-02-21 15:00:09 +0100
commitce7980ae9080f72f08d50355c4d9084d57aece63 (patch)
tree7c19278a12852b75dee2f4e67a318fc9d60807a6 /kernel/irq
parentPCI/MSI: Clarify usage of pci_msix_free_irq() (diff)
downloadlinux-ce7980ae9080f72f08d50355c4d9084d57aece63.tar.xz
linux-ce7980ae9080f72f08d50355c4d9084d57aece63.zip
genirq/irqdesc: 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 which prevents modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230217-kobj_type-irq-v1-1-fedfacaf8cdb@weissschuh.net
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/irqdesc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index fd0996274401..240e145e969f 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -277,7 +277,7 @@ static struct attribute *irq_attrs[] = {
};
ATTRIBUTE_GROUPS(irq);
-static struct kobj_type irq_kobj_type = {
+static const struct kobj_type irq_kobj_type = {
.release = irq_kobj_release,
.sysfs_ops = &kobj_sysfs_ops,
.default_groups = irq_groups,
@@ -335,7 +335,7 @@ postcore_initcall(irq_sysfs_init);
#else /* !CONFIG_SYSFS */
-static struct kobj_type irq_kobj_type = {
+static const struct kobj_type irq_kobj_type = {
.release = irq_kobj_release,
};