patch-2.3.40 linux/drivers/pcmcia/cb_enabler.c
Next file: linux/drivers/pcmcia/cistpl.c
Previous file: linux/drivers/pcmcia/cardbus.c
Back to the patch index
Back to the overall index
- Lines: 59
- Date:
Tue Jan 18 22:29:17 2000
- Orig file:
v2.3.39/linux/drivers/pcmcia/cb_enabler.c
- Orig date:
Tue Dec 14 01:27:24 1999
diff -u --recursive --new-file v2.3.39/linux/drivers/pcmcia/cb_enabler.c linux/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 @@
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 @@
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 @@
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 @@
pcmcia_deregister_client(link->handle);
*linkp = link->next;
- kfree_s(link, sizeof(struct dev_link_t));
+ kfree(link);
MOD_DEC_USE_COUNT;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)