aboutsummaryrefslogtreecommitdiffstats
path: root/include/pcmcia
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-03-06 13:24:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 15:26:03 -0400
commit6ed7ffddcf61f668114edb676417e5fb33773b59 (patch)
tree931cc141550bbe82283e96b713f296c9e271f258 /include/pcmcia
parente7c2199ff300fcf88673a1cf6d7229e6c3da09de (diff)
pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate
Introduce the module_pcmcia_driver() macro which is a convenience macro for pcmcia driver modules. It is intended to be used by pcmcia drivers with init/exit sections that do nothing but register/unregister the pcmcia driver. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/pcmcia')
-rw-r--r--include/pcmcia/ds.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 3bbbd78e1439..2d56e428506c 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -65,6 +65,18 @@ struct pcmcia_driver {
65int pcmcia_register_driver(struct pcmcia_driver *driver); 65int pcmcia_register_driver(struct pcmcia_driver *driver);
66void pcmcia_unregister_driver(struct pcmcia_driver *driver); 66void pcmcia_unregister_driver(struct pcmcia_driver *driver);
67 67
68/**
69 * module_pcmcia_driver() - Helper macro for registering a pcmcia driver
70 * @__pcmcia_driver: pcmcia_driver struct
71 *
72 * Helper macro for pcmcia drivers which do not do anything special in module
73 * init/exit. This eliminates a lot of boilerplate. Each module may only use
74 * this macro once, and calling it replaces module_init() and module_exit().
75 */
76#define module_pcmcia_driver(__pcmcia_driver) \
77 module_driver(__pcmcia_driver, pcmcia_register_driver, \
78 pcmcia_unregister_driver)
79
68/* for struct resource * array embedded in struct pcmcia_device */ 80/* for struct resource * array embedded in struct pcmcia_device */
69enum { 81enum {
70 PCMCIA_IOPORT_0, 82 PCMCIA_IOPORT_0,