Skip to content

Commit ce7980a

Browse files
t-8chKAGA-KOKO
authored andcommitted
genirq/irqdesc: Make kobj_type structures constant
Since commit ee6d3dd ("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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e6cc6f1 commit ce7980a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/irq/irqdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static struct attribute *irq_attrs[] = {
277277
};
278278
ATTRIBUTE_GROUPS(irq);
279279

280-
static struct kobj_type irq_kobj_type = {
280+
static const struct kobj_type irq_kobj_type = {
281281
.release = irq_kobj_release,
282282
.sysfs_ops = &kobj_sysfs_ops,
283283
.default_groups = irq_groups,
@@ -335,7 +335,7 @@ postcore_initcall(irq_sysfs_init);
335335

336336
#else /* !CONFIG_SYSFS */
337337

338-
static struct kobj_type irq_kobj_type = {
338+
static const struct kobj_type irq_kobj_type = {
339339
.release = irq_kobj_release,
340340
};
341341

0 commit comments

Comments
 (0)