diff options
Diffstat (limited to 'drivers/pcmcia/cb_enabler.c')
-rw-r--r-- | drivers/pcmcia/cb_enabler.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/pcmcia/cb_enabler.c b/drivers/pcmcia/cb_enabler.c index bb8fe17b2..0e5ddeb93 100644 --- a/drivers/pcmcia/cb_enabler.c +++ b/drivers/pcmcia/cb_enabler.c @@ -1,8 +1,8 @@ /*====================================================================== - Cardbus device enabler + CardBus device enabler - cb_enabler.c 1.25 1999/10/25 20:03:33 + cb_enabler.c 1.28 1999/12/09 20:57:37 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -58,11 +58,14 @@ static int pc_debug = PCMCIA_DEBUG; MODULE_PARM(pc_debug, "i"); #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) static char *version = -"cb_enabler.c 1.25 1999/10/25 20:03:33 (David Hinds)"; +"cb_enabler.c 1.28 1999/12/09 20:57:37 (David Hinds)"; #else #define DEBUG(n, args...) do { } while (0) #endif +MODULE_AUTHOR("David Hinds <dhinds@pcmcia.sourceforge.org>"); +MODULE_DESCRIPTION("CardBus stub enabler module"); + /*====================================================================*/ /* Parameters that can be set with 'insmod' */ @@ -126,10 +129,11 @@ struct dev_link_t *cb_attach(int n) DEBUG(0, "cb_attach(%d)\n", n); - MOD_INC_USE_COUNT; link = kmalloc(sizeof(struct dev_link_t), GFP_KERNEL); - memset(link, 0, sizeof(struct dev_link_t)); + if (!link) return NULL; + MOD_INC_USE_COUNT; + memset(link, 0, sizeof(struct dev_link_t)); link->conf.IntType = INT_CARDBUS; link->conf.Vcc = 33; @@ -142,7 +146,7 @@ struct dev_link_t *cb_attach(int n) client_reg.dev_info = &driver[n].dev_info; client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE; client_reg.event_handler = &cb_event; - client_reg.EventMask = + client_reg.EventMask = CS_EVENT_RESET_PHYSICAL | CS_EVENT_RESET_REQUEST | CS_EVENT_CARD_RESET | CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL | CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME; @@ -186,7 +190,7 @@ static void cb_detach(dev_link_t *link) pcmcia_deregister_client(link->handle); *linkp = link->next; - kfree_s(link, sizeof(struct dev_link_t)); + kfree(link); MOD_DEC_USE_COUNT; } |