Skip to content

Commit a4d398a

Browse files
KunWuChanRussell King (Oracle)
authored andcommitted
ARM: 9416/1: amba: make amba_bustype constant
Since commit d492cc2 ("driver core: device.h: make struct bus_type a const *"), the driver core can properly handle constant struct bus_type, move the amba_bustype 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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kunwu Chan <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent de9c2c6 commit a4d398a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/amba/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static const struct dev_pm_ops amba_pm = {
435435
* DMA configuration for platform and AMBA bus is same. So here we reuse
436436
* platform's DMA config routine.
437437
*/
438-
struct bus_type amba_bustype = {
438+
const struct bus_type amba_bustype = {
439439
.name = "amba",
440440
.dev_groups = amba_dev_groups,
441441
.match = amba_match,

include/linux/amba/bus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum amba_vendor {
105105
AMBA_VENDOR_LSI = 0xb6,
106106
};
107107

108-
extern struct bus_type amba_bustype;
108+
extern const struct bus_type amba_bustype;
109109

110110
#define to_amba_device(d) container_of_const(d, struct amba_device, dev)
111111

0 commit comments

Comments
 (0)