Skip to content

Commit 1bec769

Browse files
rbmarliereDominik Brodowski
authored andcommitted
pcmcia: ds: make pcmcia_bus_type const
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 <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
1 parent c02197f commit 1bec769

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/pcmcia/cs_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void pcmcia_put_socket(struct pcmcia_socket *skt);
132132
* Stuff internal to module "pcmcia".
133133
*/
134134
/* ds.c */
135-
extern struct bus_type pcmcia_bus_type;
135+
extern const struct bus_type pcmcia_bus_type;
136136

137137
struct pcmcia_device;
138138

drivers/pcmcia/ds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ static const struct dev_pm_ops pcmcia_bus_pm_ops = {
14061406
SET_SYSTEM_SLEEP_PM_OPS(pcmcia_dev_suspend, pcmcia_dev_resume)
14071407
};
14081408

1409-
struct bus_type pcmcia_bus_type = {
1409+
const struct bus_type pcmcia_bus_type = {
14101410
.name = "pcmcia",
14111411
.uevent = pcmcia_bus_uevent,
14121412
.match = pcmcia_bus_match,

0 commit comments

Comments
 (0)