Skip to content

Commit fca3eff

Browse files
rbmarlieregregkh
authored andcommitted
parport: make parport_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the parport_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b5dd424 commit fca3eff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/parport/share.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static int parport_probe(struct device *dev)
130130
return drv->probe(to_pardevice(dev));
131131
}
132132

133-
static struct bus_type parport_bus_type = {
133+
static const struct bus_type parport_bus_type = {
134134
.name = "parport",
135135
.probe = parport_probe,
136136
};

0 commit comments

Comments
 (0)