Skip to content

Commit a9dde28

Browse files
rbmarlierefloatious
authored andcommitted
ata: pata_parport: make pata_parport_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the pata_parport_bus_type 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: "Ricardo B. Marliere" <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Niklas Cassel <[email protected]>
1 parent 54be6c6 commit a9dde28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ata/pata_parport/pata_parport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static void pata_parport_bus_release(struct device *dev)
464464
/* nothing to do here but required to avoid warning on device removal */
465465
}
466466

467-
static struct bus_type pata_parport_bus_type = {
467+
static const struct bus_type pata_parport_bus_type = {
468468
.name = DRV_NAME,
469469
};
470470

0 commit comments

Comments
 (0)