From: Ricardo B. Marliere Date: Sun, 4 Feb 2024 15:23:29 +0000 (-0300) Subject: ata: pata_parport: make pata_parport_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a9dde2823c3330503fb6906d18c7bcced7b280af;p=linux.git 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 Suggested-by: Greg Kroah-Hartman Signed-off-by: "Ricardo B. Marliere" Reviewed-by: Damien Le Moal Reviewed-by: Greg Kroah-Hartman Signed-off-by: Niklas Cassel --- diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index a7adfdcb5e27c..9a2cb9ca9d1da 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -464,7 +464,7 @@ static void pata_parport_bus_release(struct device *dev) /* nothing to do here but required to avoid warning on device removal */ } -static struct bus_type pata_parport_bus_type = { +static const struct bus_type pata_parport_bus_type = { .name = DRV_NAME, };