]> Git Repo - J-linux.git/commitdiff
pcmcia: ds: make pcmcia_bus_type const
authorRicardo B. Marliere <[email protected]>
Tue, 13 Feb 2024 14:48:45 +0000 (11:48 -0300)
committerDominik Brodowski <[email protected]>
Sun, 18 Feb 2024 16:39:43 +0000 (17:39 +0100)
Now that the driver core can properly handle constant struct bus_type,
move the pcmcia_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: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
drivers/pcmcia/cs_internal.h
drivers/pcmcia/ds.c

index 580369f3c0b06d7e6a2d4ee174c9656c24350ab2..999332bc43782f39772eef8f7e1507faa4efa53b 100644 (file)
@@ -132,7 +132,7 @@ void pcmcia_put_socket(struct pcmcia_socket *skt);
  * Stuff internal to module "pcmcia".
  */
 /* ds.c */
-extern struct bus_type pcmcia_bus_type;
+extern const struct bus_type pcmcia_bus_type;
 
 struct pcmcia_device;
 
index b4b8363d1de21f3997ee6d7e5a3af65f169a56a5..d3cfd353fb935e2333a459009630dc7179415d06 100644 (file)
@@ -1406,7 +1406,7 @@ static const struct dev_pm_ops pcmcia_bus_pm_ops = {
        SET_SYSTEM_SLEEP_PM_OPS(pcmcia_dev_suspend, pcmcia_dev_resume)
 };
 
-struct bus_type pcmcia_bus_type = {
+const struct bus_type pcmcia_bus_type = {
        .name = "pcmcia",
        .uevent = pcmcia_bus_uevent,
        .match = pcmcia_bus_match,
This page took 0.051733 seconds and 4 git commands to generate.