pcmcia: cs: make pcmcia_socket_class constant
Since commit 43a7206b09
("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>
This commit is contained in:
parent
1bec7691b3
commit
ccae53aa8a
|
@ -892,7 +892,7 @@ static const struct dev_pm_ops pcmcia_socket_pm_ops = {
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
struct class pcmcia_socket_class = {
|
const struct class pcmcia_socket_class = {
|
||||||
.name = "pcmcia_socket",
|
.name = "pcmcia_socket",
|
||||||
.dev_uevent = pcmcia_socket_uevent,
|
.dev_uevent = pcmcia_socket_uevent,
|
||||||
.dev_release = pcmcia_release_socket,
|
.dev_release = pcmcia_release_socket,
|
||||||
|
|
|
@ -113,7 +113,7 @@ struct pcmcia_callback{
|
||||||
/* cs.c */
|
/* cs.c */
|
||||||
extern struct rw_semaphore pcmcia_socket_list_rwsem;
|
extern struct rw_semaphore pcmcia_socket_list_rwsem;
|
||||||
extern struct list_head pcmcia_socket_list;
|
extern struct list_head pcmcia_socket_list;
|
||||||
extern struct class pcmcia_socket_class;
|
extern const struct class pcmcia_socket_class;
|
||||||
|
|
||||||
int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c);
|
int pccard_register_pcmcia(struct pcmcia_socket *s, struct pcmcia_callback *c);
|
||||||
struct pcmcia_socket *pcmcia_get_socket_by_nr(unsigned int nr);
|
struct pcmcia_socket *pcmcia_get_socket_by_nr(unsigned int nr);
|
||||||
|
|
Loading…
Reference in New Issue