Commit 6db60817 authored by Adrian Barnaś's avatar Adrian Barnaś Committed by Greg Kroah-Hartman
Browse files

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: default avatarAdrian Barnaś <abarnas@google.com>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20250918134429.270814-1-abarnas@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48d45ae4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1371,7 +1371,7 @@ static void sa1111_bus_remove(struct device *dev)
		drv->remove(sadev);
}

struct bus_type sa1111_bus_type = {
const struct bus_type sa1111_bus_type = {
	.name		= "sa1111-rab",
	.match		= sa1111_match,
	.probe		= sa1111_bus_probe,
+1 −1
Original line number Diff line number Diff line
@@ -368,7 +368,7 @@



extern struct bus_type sa1111_bus_type;
extern const struct bus_type sa1111_bus_type;

#define SA1111_DEVID_SBI	(1 << 0)
#define SA1111_DEVID_SK		(1 << 1)