moxtet: remove unused moxtet_type declaration
PATCH 1/2 moxtet: remove unused moxtet_type declaration
For some reason, moxtet_type was defined in moxtet.h, but never actually used. Looks like a left-over from the original commit that was exporting the moxtet bus type, but that wasn't needed, and it was a different variable name, so no one noticed this one dangling around.
Cc "Marek Behún" <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- include/linux/moxtet.h | 2 -- 1 file changed, 2 deletions(-)
include/linux/moxtet.h +0 -2
@@ -35,8 +35,6 @@ enum turris_mox_module_id {#define MOXTET_NIRQS 16 -extern struct bus_type moxtet_type; -struct moxtet {struct device *dev;struct mutex lock;
Signature · 1 line
2.43.0
PATCH 2/2 moxtet: mark moxtet_bus_type as const
Now that the driver core can properly handle constant struct bus_type, move the moxtet_bus_type to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.
Cc "Marek Behún" <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/bus/moxtet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/moxtet.c +1 -1
@@ -102,7 +102,7 @@ static int moxtet_match(struct device *dev, struct device_driver *drv)return 0 ; } -static struct bus_type moxtet_bus_type = { +static const struct bus_type moxtet_bus_type = { .name ="moxtet" , .dev_groups = moxtet_dev_groups, .match = moxtet_match,
Signature · 1 line
2.43.0