aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/can/softing/softing_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/softing/softing_cs.c')
-rw-r--r--drivers/net/can/softing/softing_cs.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/can/softing/softing_cs.c b/drivers/net/can/softing/softing_cs.c
index c2c0a5bb0b2..498605f833d 100644
--- a/drivers/net/can/softing/softing_cs.c
+++ b/drivers/net/can/softing/softing_cs.c
@@ -27,7 +27,7 @@
#include "softing_platform.h"
static int softingcs_index;
-static spinlock_t softingcs_index_lock;
+static DEFINE_SPINLOCK(softingcs_index_lock);
static int softingcs_reset(struct platform_device *pdev, int v);
static int softingcs_enable_irq(struct platform_device *pdev, int v);
@@ -340,19 +340,7 @@ static struct pcmcia_driver softingcs_driver = {
.remove = softingcs_remove,
};
-static int __init softingcs_start(void)
-{
- spin_lock_init(&softingcs_index_lock);
- return pcmcia_register_driver(&softingcs_driver);
-}
-
-static void __exit softingcs_stop(void)
-{
- pcmcia_unregister_driver(&softingcs_driver);
-}
-
-module_init(softingcs_start);
-module_exit(softingcs_stop);
+module_pcmcia_driver(softingcs_driver);
MODULE_DESCRIPTION("softing CANcard driver"
", links PCMCIA card to softing driver");