Skip to content

Commit ad4acb2

Browse files
rbmarliereglaubitz
authored andcommitted
sh: intc: Make intc_subsys const
Now that the driver core can properly handle constant struct bus_type, move the make intc_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20240208-bus_cleanup-sh2-v1-1-729277400893@marliere.net Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
1 parent d32b8d7 commit ad4acb2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/sh/intc/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ struct syscore_ops intc_syscore_ops = {
455455
.resume = intc_resume,
456456
};
457457

458-
struct bus_type intc_subsys = {
458+
const struct bus_type intc_subsys = {
459459
.name = "intc",
460460
.dev_name = "intc",
461461
};

drivers/sh/intc/internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void _intc_enable(struct irq_data *data, unsigned long handle);
160160
/* core.c */
161161
extern struct list_head intc_list;
162162
extern raw_spinlock_t intc_big_lock;
163-
extern struct bus_type intc_subsys;
163+
extern const struct bus_type intc_subsys;
164164

165165
unsigned int intc_get_dfl_prio_level(void);
166166
unsigned int intc_get_prio_level(unsigned int irq);

0 commit comments

Comments
 (0)