Commit a4d398a5 authored by Kunwu Chan's avatar Kunwu Chan Committed by Russell King (Oracle)
Browse files

ARM: 9416/1: amba: make amba_bustype constant



Since commit d492cc25 ("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 <gregkh@linuxfoundation.org>
Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent de9c2c66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static const struct dev_pm_ops amba_pm = {
 * DMA configuration for platform and AMBA bus is same. So here we reuse
 * platform's DMA config routine.
 */
struct bus_type amba_bustype = {
const struct bus_type amba_bustype = {
	.name		= "amba",
	.dev_groups	= amba_dev_groups,
	.match		= amba_match,
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ enum amba_vendor {
	AMBA_VENDOR_LSI = 0xb6,
};

extern struct bus_type amba_bustype;
extern const struct bus_type amba_bustype;

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