diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-03-05 22:38:25 +0300 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2024-03-10 11:07:00 +0300 |
commit | ccae53aa8aa2d902242555638c5de104aab08879 (patch) | |
tree | 32de34fd32b13fc8590fa4eaf2f6036af0a556b4 /drivers/pcmcia/cs.c | |
parent | 1bec7691b32710ea27741f0f8b00c1dc98d92930 (diff) | |
download | linux-ccae53aa8aa2d902242555638c5de104aab08879.tar.xz |
pcmcia: cs: make pcmcia_socket_class constant
Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the pcmcia_socket_class structure to be declared at build
time placing it into read-only memory, instead of having to be dynamically
allocated at boot time.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r-- | drivers/pcmcia/cs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index b33be1e63c98..c75f55e1250a 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c @@ -892,7 +892,7 @@ static const struct dev_pm_ops pcmcia_socket_pm_ops = { #endif /* CONFIG_PM */ -struct class pcmcia_socket_class = { +const struct class pcmcia_socket_class = { .name = "pcmcia_socket", .dev_uevent = pcmcia_socket_uevent, .dev_release = pcmcia_release_socket, |