Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm: make sa1111_bus_type const

Because driver core can properly handle constant struct bus_type,
move the sa1111_bus_type to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Signed-off-by: Adrian Barnaś <abarnas@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250918134429.270814-1-abarnas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Barnaś and committed by
Greg Kroah-Hartman
6db60817 48d45ae4

+2 -2
+1 -1
arch/arm/common/sa1111.c
··· 1371 1371 drv->remove(sadev); 1372 1372 } 1373 1373 1374 - struct bus_type sa1111_bus_type = { 1374 + const struct bus_type sa1111_bus_type = { 1375 1375 .name = "sa1111-rab", 1376 1376 .match = sa1111_match, 1377 1377 .probe = sa1111_bus_probe,
+1 -1
arch/arm/include/asm/hardware/sa1111.h
··· 368 368 369 369 370 370 371 - extern struct bus_type sa1111_bus_type; 371 + extern const struct bus_type sa1111_bus_type; 372 372 373 373 #define SA1111_DEVID_SBI (1 << 0) 374 374 #define SA1111_DEVID_SK (1 << 1)