Commit 2262054e authored by Dominik Brodowski's avatar Dominik Brodowski

pcmcia: remove obsolete and wrong comments

What's worse than no comment? A wrong comment.

Several PCMCIA device drivers contained the same comments, which
were based on how the PCMCIA subsystem worked in the old days of 2.4.,
and which were originally part of a "dummy_cs" driver. These comments
no longer matched at all what is happening now, and therefore should
be removed.
Tested-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 06b3a1d1
...@@ -71,17 +71,6 @@ static int ide_config(struct pcmcia_device *); ...@@ -71,17 +71,6 @@ static int ide_config(struct pcmcia_device *);
static void ide_detach(struct pcmcia_device *p_dev); static void ide_detach(struct pcmcia_device *p_dev);
/*======================================================================
ide_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int ide_probe(struct pcmcia_device *link) static int ide_probe(struct pcmcia_device *link)
{ {
ide_info_t *info; ide_info_t *info;
...@@ -102,15 +91,6 @@ static int ide_probe(struct pcmcia_device *link) ...@@ -102,15 +91,6 @@ static int ide_probe(struct pcmcia_device *link)
return ide_config(link); return ide_config(link);
} /* ide_attach */ } /* ide_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void ide_detach(struct pcmcia_device *link) static void ide_detach(struct pcmcia_device *link)
{ {
ide_info_t *info = link->priv; ide_info_t *info = link->priv;
...@@ -184,14 +164,6 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl, ...@@ -184,14 +164,6 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
return NULL; return NULL;
} }
/*======================================================================
ide_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ide device available to the system.
======================================================================*/
static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data) static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data)
{ {
int *is_kme = priv_data; int *is_kme = priv_data;
...@@ -275,14 +247,6 @@ static int ide_config(struct pcmcia_device *link) ...@@ -275,14 +247,6 @@ static int ide_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* ide_config */ } /* ide_config */
/*======================================================================
After a card is removed, ide_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void ide_release(struct pcmcia_device *link) static void ide_release(struct pcmcia_device *link)
{ {
ide_info_t *info = link->priv; ide_info_t *info = link->priv;
...@@ -308,15 +272,6 @@ static void ide_release(struct pcmcia_device *link) ...@@ -308,15 +272,6 @@ static void ide_release(struct pcmcia_device *link)
} /* ide_release */ } /* ide_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received. A CARD_REMOVAL event
also sets some flags to discourage the ide drivers from
talking to the ports.
======================================================================*/
static struct pcmcia_device_id ide_ids[] = { static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_FUNC_ID(4), PCMCIA_DEVICE_FUNC_ID(4),
PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */ PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */
......
...@@ -38,38 +38,10 @@ MODULE_LICENSE("GPL"); ...@@ -38,38 +38,10 @@ MODULE_LICENSE("GPL");
/*====================================================================*/ /*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card insertion
and ejection events. They are invoked from the skeleton event
handler.
*/
static int avmcs_config(struct pcmcia_device *link); static int avmcs_config(struct pcmcia_device *link);
static void avmcs_release(struct pcmcia_device *link); static void avmcs_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void avmcs_detach(struct pcmcia_device *p_dev); static void avmcs_detach(struct pcmcia_device *p_dev);
/*======================================================================
avmcs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int avmcs_probe(struct pcmcia_device *p_dev) static int avmcs_probe(struct pcmcia_device *p_dev)
{ {
/* General socket configuration */ /* General socket configuration */
...@@ -80,28 +52,12 @@ static int avmcs_probe(struct pcmcia_device *p_dev) ...@@ -80,28 +52,12 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
return avmcs_config(p_dev); return avmcs_config(p_dev);
} /* avmcs_attach */ } /* avmcs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void avmcs_detach(struct pcmcia_device *link) static void avmcs_detach(struct pcmcia_device *link)
{ {
avmcs_release(link); avmcs_release(link);
} /* avmcs_detach */ } /* avmcs_detach */
/*======================================================================
avmcs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data) static int avmcs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
{ {
p_dev->resource[0]->end = 16; p_dev->resource[0]->end = 16;
...@@ -185,13 +141,6 @@ static int avmcs_config(struct pcmcia_device *link) ...@@ -185,13 +141,6 @@ static int avmcs_config(struct pcmcia_device *link)
} /* avmcs_config */ } /* avmcs_config */
/*======================================================================
After a card is removed, avmcs_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void avmcs_release(struct pcmcia_device *link) static void avmcs_release(struct pcmcia_device *link)
{ {
......
...@@ -39,39 +39,10 @@ module_param(isdnprot, int, 0); ...@@ -39,39 +39,10 @@ module_param(isdnprot, int, 0);
/*====================================================================*/ /*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card insertion
and ejection events. They are invoked from the skeleton event
handler.
*/
static int avma1cs_config(struct pcmcia_device *link) __devinit ; static int avma1cs_config(struct pcmcia_device *link) __devinit ;
static void avma1cs_release(struct pcmcia_device *link); static void avma1cs_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ; static void avma1cs_detach(struct pcmcia_device *p_dev) __devexit ;
/*======================================================================
avma1cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
{ {
dev_dbg(&p_dev->dev, "avma1cs_attach()\n"); dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
...@@ -84,15 +55,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev) ...@@ -84,15 +55,6 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
return avma1cs_config(p_dev); return avma1cs_config(p_dev);
} /* avma1cs_attach */ } /* avma1cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void __devexit avma1cs_detach(struct pcmcia_device *link) static void __devexit avma1cs_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link); dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
...@@ -100,14 +62,6 @@ static void __devexit avma1cs_detach(struct pcmcia_device *link) ...@@ -100,14 +62,6 @@ static void __devexit avma1cs_detach(struct pcmcia_device *link)
kfree(link->priv); kfree(link->priv);
} /* avma1cs_detach */ } /* avma1cs_detach */
/*======================================================================
avma1cs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) static int avma1cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
{ {
p_dev->resource[0]->end = 16; p_dev->resource[0]->end = 16;
...@@ -180,14 +134,6 @@ static int __devinit avma1cs_config(struct pcmcia_device *link) ...@@ -180,14 +134,6 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
return 0; return 0;
} /* avma1cs_config */ } /* avma1cs_config */
/*======================================================================
After a card is removed, avma1cs_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void avma1cs_release(struct pcmcia_device *link) static void avma1cs_release(struct pcmcia_device *link)
{ {
unsigned long minor = (unsigned long) link->priv; unsigned long minor = (unsigned long) link->priv;
...@@ -200,7 +146,6 @@ static void avma1cs_release(struct pcmcia_device *link) ...@@ -200,7 +146,6 @@ static void avma1cs_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* avma1cs_release */ } /* avma1cs_release */
static struct pcmcia_device_id avma1cs_ids[] = { static struct pcmcia_device_id avma1cs_ids[] = {
PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb), PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b), PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b),
...@@ -216,8 +161,6 @@ static struct pcmcia_driver avma1cs_driver = { ...@@ -216,8 +161,6 @@ static struct pcmcia_driver avma1cs_driver = {
.id_table = avma1cs_ids, .id_table = avma1cs_ids,
}; };
/*====================================================================*/
static int __init init_avma1_cs(void) static int __init init_avma1_cs(void)
{ {
return pcmcia_register_driver(&avma1cs_driver); return pcmcia_register_driver(&avma1cs_driver);
......
...@@ -63,26 +63,8 @@ MODULE_LICENSE("Dual MPL/GPL"); ...@@ -63,26 +63,8 @@ MODULE_LICENSE("Dual MPL/GPL");
static int protocol = 2; /* EURO-ISDN Default */ static int protocol = 2; /* EURO-ISDN Default */
module_param(protocol, int, 0); module_param(protocol, int, 0);
/*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card insertion
and ejection events. They are invoked from the elsa_cs event
handler.
*/
static int elsa_cs_config(struct pcmcia_device *link) __devinit ; static int elsa_cs_config(struct pcmcia_device *link) __devinit ;
static void elsa_cs_release(struct pcmcia_device *link); static void elsa_cs_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit; static void elsa_cs_detach(struct pcmcia_device *p_dev) __devexit;
typedef struct local_info_t { typedef struct local_info_t {
...@@ -91,18 +73,6 @@ typedef struct local_info_t { ...@@ -91,18 +73,6 @@ typedef struct local_info_t {
int cardnr; int cardnr;
} local_info_t; } local_info_t;
/*======================================================================
elsa_cs_attach() creates an "instance" of the driver, allocatingx
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int __devinit elsa_cs_probe(struct pcmcia_device *link) static int __devinit elsa_cs_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
...@@ -121,15 +91,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link) ...@@ -121,15 +91,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
return elsa_cs_config(link); return elsa_cs_config(link);
} /* elsa_cs_attach */ } /* elsa_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void __devexit elsa_cs_detach(struct pcmcia_device *link) static void __devexit elsa_cs_detach(struct pcmcia_device *link)
{ {
local_info_t *info = link->priv; local_info_t *info = link->priv;
...@@ -142,14 +103,6 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link) ...@@ -142,14 +103,6 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link)
kfree(info); kfree(info);
} /* elsa_cs_detach */ } /* elsa_cs_detach */
/*======================================================================
elsa_cs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) static int elsa_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
{ {
int j; int j;
...@@ -215,14 +168,6 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link) ...@@ -215,14 +168,6 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* elsa_cs_config */ } /* elsa_cs_config */
/*======================================================================
After a card is removed, elsa_cs_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void elsa_cs_release(struct pcmcia_device *link) static void elsa_cs_release(struct pcmcia_device *link)
{ {
local_info_t *local = link->priv; local_info_t *local = link->priv;
......
...@@ -63,26 +63,9 @@ MODULE_LICENSE("Dual MPL/GPL"); ...@@ -63,26 +63,9 @@ MODULE_LICENSE("Dual MPL/GPL");
static int protocol = 2; /* EURO-ISDN Default */ static int protocol = 2; /* EURO-ISDN Default */
module_param(protocol, int, 0); module_param(protocol, int, 0);
/*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events. They are invoked from the sedlbauer
event handler.
*/
static int sedlbauer_config(struct pcmcia_device *link) __devinit ; static int sedlbauer_config(struct pcmcia_device *link) __devinit ;
static void sedlbauer_release(struct pcmcia_device *link); static void sedlbauer_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit; static void sedlbauer_detach(struct pcmcia_device *p_dev) __devexit;
typedef struct local_info_t { typedef struct local_info_t {
...@@ -91,18 +74,6 @@ typedef struct local_info_t { ...@@ -91,18 +74,6 @@ typedef struct local_info_t {
int cardnr; int cardnr;
} local_info_t; } local_info_t;
/*======================================================================
sedlbauer_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int __devinit sedlbauer_probe(struct pcmcia_device *link) static int __devinit sedlbauer_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
...@@ -117,30 +88,9 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link) ...@@ -117,30 +88,9 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)
local->p_dev = link; local->p_dev = link;
link->priv = local; link->priv = local;
/*
General socket configuration defaults can go here. In this
client, we assume very little, and rely on the CIS for almost
everything. In most clients, many details (i.e., number, sizes,
and attributes of IO windows) are fixed by the nature of the
device, and can be hard-wired here.
*/
/* from old sedl_cs
*/
/* The io structure describes IO port mapping */
return sedlbauer_config(link); return sedlbauer_config(link);
} /* sedlbauer_attach */ } /* sedlbauer_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void __devexit sedlbauer_detach(struct pcmcia_device *link) static void __devexit sedlbauer_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link); dev_dbg(&link->dev, "sedlbauer_detach(0x%p)\n", link);
...@@ -152,13 +102,6 @@ static void __devexit sedlbauer_detach(struct pcmcia_device *link) ...@@ -152,13 +102,6 @@ static void __devexit sedlbauer_detach(struct pcmcia_device *link)
kfree(link->priv); kfree(link->priv);
} /* sedlbauer_detach */ } /* sedlbauer_detach */
/*======================================================================
sedlbauer_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
if (p_dev->config_index == 0) if (p_dev->config_index == 0)
...@@ -168,8 +111,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data) ...@@ -168,8 +111,6 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev, void *priv_data)
return pcmcia_request_io(p_dev); return pcmcia_request_io(p_dev);
} }
static int __devinit sedlbauer_config(struct pcmcia_device *link) static int __devinit sedlbauer_config(struct pcmcia_device *link)
{ {
int ret; int ret;
...@@ -180,27 +121,10 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) ...@@ -180,27 +121,10 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_CHECK_VCC |
CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; CONF_AUTO_SET_VPP | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
/*
In this loop, we scan the CIS for configuration table entries,
each of which describes a valid card configuration, including
voltage, IO window, memory window, and interrupt settings.
We make no assumptions about the card to be configured: we use
just the information available in the CIS. In an ideal world,
this would work for any PCMCIA card, but it requires a complete
and accurate CIS. In practice, a driver usually "knows" most of
these things without consulting the CIS, and most client drivers
will only use the CIS to fill in implementation-defined details.
*/
ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL); ret = pcmcia_loop_config(link, sedlbauer_config_check, NULL);
if (ret) if (ret)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -228,14 +152,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link) ...@@ -228,14 +152,6 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
} /* sedlbauer_config */ } /* sedlbauer_config */
/*======================================================================
After a card is removed, sedlbauer_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void sedlbauer_release(struct pcmcia_device *link) static void sedlbauer_release(struct pcmcia_device *link)
{ {
local_info_t *local = link->priv; local_info_t *local = link->priv;
......
...@@ -44,26 +44,8 @@ MODULE_LICENSE("GPL"); ...@@ -44,26 +44,8 @@ MODULE_LICENSE("GPL");
static int protocol = 2; /* EURO-ISDN Default */ static int protocol = 2; /* EURO-ISDN Default */
module_param(protocol, int, 0); module_param(protocol, int, 0);
/*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card insertion
and ejection events. They are invoked from the teles_cs event
handler.
*/
static int teles_cs_config(struct pcmcia_device *link) __devinit ; static int teles_cs_config(struct pcmcia_device *link) __devinit ;
static void teles_cs_release(struct pcmcia_device *link); static void teles_cs_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void teles_detach(struct pcmcia_device *p_dev) __devexit ; static void teles_detach(struct pcmcia_device *p_dev) __devexit ;
typedef struct local_info_t { typedef struct local_info_t {
...@@ -72,18 +54,6 @@ typedef struct local_info_t { ...@@ -72,18 +54,6 @@ typedef struct local_info_t {
int cardnr; int cardnr;
} local_info_t; } local_info_t;
/*======================================================================
teles_attach() creates an "instance" of the driver, allocatingx
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int __devinit teles_probe(struct pcmcia_device *link) static int __devinit teles_probe(struct pcmcia_device *link)
{ {
local_info_t *local; local_info_t *local;
...@@ -98,27 +68,11 @@ static int __devinit teles_probe(struct pcmcia_device *link) ...@@ -98,27 +68,11 @@ static int __devinit teles_probe(struct pcmcia_device *link)
local->p_dev = link; local->p_dev = link;
link->priv = local; link->priv = local;
/*
General socket configuration defaults can go here. In this
client, we assume very little, and rely on the CIS for almost
everything. In most clients, many details (i.e., number, sizes,
and attributes of IO windows) are fixed by the nature of the
device, and can be hard-wired here.
*/
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO; link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO;
return teles_cs_config(link); return teles_cs_config(link);
} /* teles_attach */ } /* teles_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void __devexit teles_detach(struct pcmcia_device *link) static void __devexit teles_detach(struct pcmcia_device *link)
{ {
local_info_t *info = link->priv; local_info_t *info = link->priv;
...@@ -131,14 +85,6 @@ static void __devexit teles_detach(struct pcmcia_device *link) ...@@ -131,14 +85,6 @@ static void __devexit teles_detach(struct pcmcia_device *link)
kfree(info); kfree(info);
} /* teles_detach */ } /* teles_detach */
/*======================================================================
teles_cs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data) static int teles_cs_configcheck(struct pcmcia_device *p_dev, void *priv_data)
{ {
int j; int j;
...@@ -204,14 +150,6 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) ...@@ -204,14 +150,6 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* teles_cs_config */ } /* teles_cs_config */
/*======================================================================
After a card is removed, teles_cs_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void teles_cs_release(struct pcmcia_device *link) static void teles_cs_release(struct pcmcia_device *link)
{ {
local_info_t *local = link->priv; local_info_t *local = link->priv;
......
...@@ -321,11 +321,6 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on) ...@@ -321,11 +321,6 @@ static void pcmciamtd_set_vpp(struct map_info *map, int on)
} }
/* After a card is removed, pcmciamtd_release() will unregister the
* device, and release the PCMCIA configuration. If the device is
* still open, this will be postponed until it is closed.
*/
static void pcmciamtd_release(struct pcmcia_device *link) static void pcmciamtd_release(struct pcmcia_device *link)
{ {
struct pcmciamtd_dev *dev = link->priv; struct pcmciamtd_dev *dev = link->priv;
...@@ -475,11 +470,6 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *p_dev ...@@ -475,11 +470,6 @@ static void card_settings(struct pcmciamtd_dev *dev, struct pcmcia_device *p_dev
} }
/* pcmciamtd_config() is scheduled to run after a CARD_INSERTION event
* is received, to configure the PCMCIA socket, and to make the
* MTD device available to the system.
*/
static int pcmciamtd_config(struct pcmcia_device *link) static int pcmciamtd_config(struct pcmcia_device *link)
{ {
struct pcmciamtd_dev *dev = link->priv; struct pcmciamtd_dev *dev = link->priv;
...@@ -676,12 +666,6 @@ static int pcmciamtd_resume(struct pcmcia_device *dev) ...@@ -676,12 +666,6 @@ static int pcmciamtd_resume(struct pcmcia_device *dev)
} }
/* This deletes a driver "instance". The device is de-registered
* with Card Services. If it has been released, all local data
* structures are freed. Otherwise, the structures will be freed
* when the device is released.
*/
static void pcmciamtd_detach(struct pcmcia_device *link) static void pcmciamtd_detach(struct pcmcia_device *link)
{ {
struct pcmciamtd_dev *dev = link->priv; struct pcmciamtd_dev *dev = link->priv;
...@@ -699,11 +683,6 @@ static void pcmciamtd_detach(struct pcmcia_device *link) ...@@ -699,11 +683,6 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
} }
/* pcmciamtd_attach() creates an "instance" of the driver, allocating
* local data structures for one device. The device is registered
* with Card Services.
*/
static int pcmciamtd_probe(struct pcmcia_device *link) static int pcmciamtd_probe(struct pcmcia_device *link)
{ {
struct pcmciamtd_dev *dev; struct pcmciamtd_dev *dev;
......
...@@ -287,16 +287,7 @@ static int tc574_probe(struct pcmcia_device *link) ...@@ -287,16 +287,7 @@ static int tc574_probe(struct pcmcia_device *link)
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
return tc574_config(link); return tc574_config(link);
} /* tc574_attach */ }
/*
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
*/
static void tc574_detach(struct pcmcia_device *link) static void tc574_detach(struct pcmcia_device *link)
{ {
...@@ -311,12 +302,6 @@ static void tc574_detach(struct pcmcia_device *link) ...@@ -311,12 +302,6 @@ static void tc574_detach(struct pcmcia_device *link)
free_netdev(dev); free_netdev(dev);
} /* tc574_detach */ } /* tc574_detach */
/*
tc574_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
*/
static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
static int tc574_config(struct pcmcia_device *link) static int tc574_config(struct pcmcia_device *link)
...@@ -463,12 +448,6 @@ static int tc574_config(struct pcmcia_device *link) ...@@ -463,12 +448,6 @@ static int tc574_config(struct pcmcia_device *link)
} /* tc574_config */ } /* tc574_config */
/*
After a card is removed, tc574_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
*/
static void tc574_release(struct pcmcia_device *link) static void tc574_release(struct pcmcia_device *link)
{ {
pcmcia_disable_device(link); pcmcia_disable_device(link);
......
...@@ -175,14 +175,6 @@ static const struct ethtool_ops netdev_ethtool_ops; ...@@ -175,14 +175,6 @@ static const struct ethtool_ops netdev_ethtool_ops;
static void tc589_detach(struct pcmcia_device *p_dev); static void tc589_detach(struct pcmcia_device *p_dev);
/*======================================================================
tc589_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static const struct net_device_ops el3_netdev_ops = { static const struct net_device_ops el3_netdev_ops = {
.ndo_open = el3_open, .ndo_open = el3_open,
.ndo_stop = el3_close, .ndo_stop = el3_close,
...@@ -224,16 +216,7 @@ static int tc589_probe(struct pcmcia_device *link) ...@@ -224,16 +216,7 @@ static int tc589_probe(struct pcmcia_device *link)
SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
return tc589_config(link); return tc589_config(link);
} /* tc589_attach */ }
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void tc589_detach(struct pcmcia_device *link) static void tc589_detach(struct pcmcia_device *link)
{ {
...@@ -248,14 +231,6 @@ static void tc589_detach(struct pcmcia_device *link) ...@@ -248,14 +231,6 @@ static void tc589_detach(struct pcmcia_device *link)
free_netdev(dev); free_netdev(dev);
} /* tc589_detach */ } /* tc589_detach */
/*======================================================================
tc589_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int tc589_config(struct pcmcia_device *link) static int tc589_config(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -350,14 +325,6 @@ static int tc589_config(struct pcmcia_device *link) ...@@ -350,14 +325,6 @@ static int tc589_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* tc589_config */ } /* tc589_config */
/*======================================================================
After a card is removed, tc589_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void tc589_release(struct pcmcia_device *link) static void tc589_release(struct pcmcia_device *link)
{ {
pcmcia_disable_device(link); pcmcia_disable_device(link);
......
...@@ -139,14 +139,6 @@ static const struct net_device_ops axnet_netdev_ops = { ...@@ -139,14 +139,6 @@ static const struct net_device_ops axnet_netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/*======================================================================
axnet_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int axnet_probe(struct pcmcia_device *link) static int axnet_probe(struct pcmcia_device *link)
{ {
axnet_dev_t *info; axnet_dev_t *info;
...@@ -175,15 +167,6 @@ static int axnet_probe(struct pcmcia_device *link) ...@@ -175,15 +167,6 @@ static int axnet_probe(struct pcmcia_device *link)
return axnet_config(link); return axnet_config(link);
} /* axnet_attach */ } /* axnet_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void axnet_detach(struct pcmcia_device *link) static void axnet_detach(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -246,14 +229,6 @@ static int get_prom(struct pcmcia_device *link) ...@@ -246,14 +229,6 @@ static int get_prom(struct pcmcia_device *link)
return 1; return 1;
} /* get_prom */ } /* get_prom */
/*======================================================================
axnet_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int try_io_port(struct pcmcia_device *link) static int try_io_port(struct pcmcia_device *link)
{ {
int j, ret; int j, ret;
...@@ -392,14 +367,6 @@ static int axnet_config(struct pcmcia_device *link) ...@@ -392,14 +367,6 @@ static int axnet_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* axnet_config */ } /* axnet_config */
/*======================================================================
After a card is removed, axnet_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void axnet_release(struct pcmcia_device *link) static void axnet_release(struct pcmcia_device *link)
{ {
pcmcia_disable_device(link); pcmcia_disable_device(link);
......
...@@ -122,14 +122,6 @@ typedef struct com20020_dev_t { ...@@ -122,14 +122,6 @@ typedef struct com20020_dev_t {
struct net_device *dev; struct net_device *dev;
} com20020_dev_t; } com20020_dev_t;
/*======================================================================
com20020_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int com20020_probe(struct pcmcia_device *p_dev) static int com20020_probe(struct pcmcia_device *p_dev)
{ {
com20020_dev_t *info; com20020_dev_t *info;
...@@ -172,15 +164,6 @@ static int com20020_probe(struct pcmcia_device *p_dev) ...@@ -172,15 +164,6 @@ static int com20020_probe(struct pcmcia_device *p_dev)
return -ENOMEM; return -ENOMEM;
} /* com20020_attach */ } /* com20020_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void com20020_detach(struct pcmcia_device *link) static void com20020_detach(struct pcmcia_device *link)
{ {
struct com20020_dev_t *info = link->priv; struct com20020_dev_t *info = link->priv;
...@@ -219,14 +202,6 @@ static void com20020_detach(struct pcmcia_device *link) ...@@ -219,14 +202,6 @@ static void com20020_detach(struct pcmcia_device *link)
} /* com20020_detach */ } /* com20020_detach */
/*======================================================================
com20020_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int com20020_config(struct pcmcia_device *link) static int com20020_config(struct pcmcia_device *link)
{ {
struct arcnet_local *lp; struct arcnet_local *lp;
...@@ -314,14 +289,6 @@ static int com20020_config(struct pcmcia_device *link) ...@@ -314,14 +289,6 @@ static int com20020_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* com20020_config */ } /* com20020_config */
/*======================================================================
After a card is removed, com20020_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void com20020_release(struct pcmcia_device *link) static void com20020_release(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "com20020_release\n"); dev_dbg(&link->dev, "com20020_release\n");
......
...@@ -121,14 +121,6 @@ static irqreturn_t ibmtr_interrupt(int irq, void *dev_id) { ...@@ -121,14 +121,6 @@ static irqreturn_t ibmtr_interrupt(int irq, void *dev_id) {
return tok_interrupt(irq, dev); return tok_interrupt(irq, dev);
}; };
/*======================================================================
ibmtr_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int __devinit ibmtr_attach(struct pcmcia_device *link) static int __devinit ibmtr_attach(struct pcmcia_device *link)
{ {
ibmtr_dev_t *info; ibmtr_dev_t *info;
...@@ -161,15 +153,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link) ...@@ -161,15 +153,6 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
return ibmtr_config(link); return ibmtr_config(link);
} /* ibmtr_attach */ } /* ibmtr_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void ibmtr_detach(struct pcmcia_device *link) static void ibmtr_detach(struct pcmcia_device *link)
{ {
struct ibmtr_dev_t *info = link->priv; struct ibmtr_dev_t *info = link->priv;
...@@ -194,14 +177,6 @@ static void ibmtr_detach(struct pcmcia_device *link) ...@@ -194,14 +177,6 @@ static void ibmtr_detach(struct pcmcia_device *link)
kfree(info); kfree(info);
} /* ibmtr_detach */ } /* ibmtr_detach */
/*======================================================================
ibmtr_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
token-ring device available to the system.
======================================================================*/
static int __devinit ibmtr_config(struct pcmcia_device *link) static int __devinit ibmtr_config(struct pcmcia_device *link)
{ {
ibmtr_dev_t *info = link->priv; ibmtr_dev_t *info = link->priv;
...@@ -297,14 +272,6 @@ static int __devinit ibmtr_config(struct pcmcia_device *link) ...@@ -297,14 +272,6 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* ibmtr_config */ } /* ibmtr_config */
/*======================================================================
After a card is removed, ibmtr_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void ibmtr_release(struct pcmcia_device *link) static void ibmtr_release(struct pcmcia_device *link)
{ {
ibmtr_dev_t *info = link->priv; ibmtr_dev_t *info = link->priv;
......
...@@ -434,13 +434,6 @@ static const struct net_device_ops mace_netdev_ops = { ...@@ -434,13 +434,6 @@ static const struct net_device_ops mace_netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/* ----------------------------------------------------------------------------
nmclan_attach
Creates an "instance" of the driver, allocating local data
structures for one device. The device is registered with Card
Services.
---------------------------------------------------------------------------- */
static int nmclan_probe(struct pcmcia_device *link) static int nmclan_probe(struct pcmcia_device *link)
{ {
mace_private *lp; mace_private *lp;
...@@ -472,14 +465,6 @@ static int nmclan_probe(struct pcmcia_device *link) ...@@ -472,14 +465,6 @@ static int nmclan_probe(struct pcmcia_device *link)
return nmclan_config(link); return nmclan_config(link);
} /* nmclan_attach */ } /* nmclan_attach */
/* ----------------------------------------------------------------------------
nmclan_detach
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
---------------------------------------------------------------------------- */
static void nmclan_detach(struct pcmcia_device *link) static void nmclan_detach(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -623,13 +608,6 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr) ...@@ -623,13 +608,6 @@ static int mace_init(mace_private *lp, unsigned int ioaddr, char *enet_addr)
return 0; return 0;
} /* mace_init */ } /* mace_init */
/* ----------------------------------------------------------------------------
nmclan_config
This routine is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
---------------------------------------------------------------------------- */
static int nmclan_config(struct pcmcia_device *link) static int nmclan_config(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -710,12 +688,6 @@ static int nmclan_config(struct pcmcia_device *link) ...@@ -710,12 +688,6 @@ static int nmclan_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* nmclan_config */ } /* nmclan_config */
/* ----------------------------------------------------------------------------
nmclan_release
After a card is removed, nmclan_release() will unregister the
net device, and release the PCMCIA configuration. If the device
is still open, this will be postponed until it is closed.
---------------------------------------------------------------------------- */
static void nmclan_release(struct pcmcia_device *link) static void nmclan_release(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "nmclan_release\n"); dev_dbg(&link->dev, "nmclan_release\n");
......
...@@ -237,14 +237,6 @@ static const struct net_device_ops pcnet_netdev_ops = { ...@@ -237,14 +237,6 @@ static const struct net_device_ops pcnet_netdev_ops = {
#endif #endif
}; };
/*======================================================================
pcnet_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int pcnet_probe(struct pcmcia_device *link) static int pcnet_probe(struct pcmcia_device *link)
{ {
pcnet_dev_t *info; pcnet_dev_t *info;
...@@ -266,15 +258,6 @@ static int pcnet_probe(struct pcmcia_device *link) ...@@ -266,15 +258,6 @@ static int pcnet_probe(struct pcmcia_device *link)
return pcnet_config(link); return pcnet_config(link);
} /* pcnet_attach */ } /* pcnet_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void pcnet_detach(struct pcmcia_device *link) static void pcnet_detach(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -461,14 +444,6 @@ static hw_info_t *get_hwired(struct pcmcia_device *link) ...@@ -461,14 +444,6 @@ static hw_info_t *get_hwired(struct pcmcia_device *link)
return &default_info; return &default_info;
} /* get_hwired */ } /* get_hwired */
/*======================================================================
pcnet_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int try_io_port(struct pcmcia_device *link) static int try_io_port(struct pcmcia_device *link)
{ {
int j, ret; int j, ret;
...@@ -665,14 +640,6 @@ static int pcnet_config(struct pcmcia_device *link) ...@@ -665,14 +640,6 @@ static int pcnet_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* pcnet_config */ } /* pcnet_config */
/*======================================================================
After a card is removed, pcnet_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void pcnet_release(struct pcmcia_device *link) static void pcnet_release(struct pcmcia_device *link)
{ {
pcnet_dev_t *info = PRIV(link->priv); pcnet_dev_t *info = PRIV(link->priv);
...@@ -685,15 +652,6 @@ static void pcnet_release(struct pcmcia_device *link) ...@@ -685,15 +652,6 @@ static void pcnet_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} }
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received. A CARD_REMOVAL event
also sets some flags to discourage the net drivers from trying
to talk to the card any more.
======================================================================*/
static int pcnet_suspend(struct pcmcia_device *link) static int pcnet_suspend(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
......
...@@ -299,14 +299,6 @@ static const struct net_device_ops smc_netdev_ops = { ...@@ -299,14 +299,6 @@ static const struct net_device_ops smc_netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/*======================================================================
smc91c92_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int smc91c92_probe(struct pcmcia_device *link) static int smc91c92_probe(struct pcmcia_device *link)
{ {
struct smc_private *smc; struct smc_private *smc;
...@@ -338,15 +330,6 @@ static int smc91c92_probe(struct pcmcia_device *link) ...@@ -338,15 +330,6 @@ static int smc91c92_probe(struct pcmcia_device *link)
return smc91c92_config(link); return smc91c92_config(link);
} /* smc91c92_attach */ } /* smc91c92_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void smc91c92_detach(struct pcmcia_device *link) static void smc91c92_detach(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -819,14 +802,6 @@ static int check_sig(struct pcmcia_device *link) ...@@ -819,14 +802,6 @@ static int check_sig(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} }
/*======================================================================
smc91c92_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int smc91c92_config(struct pcmcia_device *link) static int smc91c92_config(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -977,14 +952,6 @@ static int smc91c92_config(struct pcmcia_device *link) ...@@ -977,14 +952,6 @@ static int smc91c92_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* smc91c92_config */ } /* smc91c92_config */
/*======================================================================
After a card is removed, smc91c92_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void smc91c92_release(struct pcmcia_device *link) static void smc91c92_release(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "smc91c92_release\n"); dev_dbg(&link->dev, "smc91c92_release\n");
......
...@@ -266,33 +266,11 @@ static unsigned mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg); ...@@ -266,33 +266,11 @@ static unsigned mii_rd(unsigned int ioaddr, u_char phyaddr, u_char phyreg);
static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg, static void mii_wr(unsigned int ioaddr, u_char phyaddr, u_char phyreg,
unsigned data, int len); unsigned data, int len);
/*
* The event() function is this driver's Card Services event handler.
* It will be called by Card Services when an appropriate card status
* event is received. The config() and release() entry points are
* used to configure or release a socket, in response to card insertion
* and ejection events. They are invoked from the event handler.
*/
static int has_ce2_string(struct pcmcia_device * link); static int has_ce2_string(struct pcmcia_device * link);
static int xirc2ps_config(struct pcmcia_device * link); static int xirc2ps_config(struct pcmcia_device * link);
static void xirc2ps_release(struct pcmcia_device * link); static void xirc2ps_release(struct pcmcia_device * link);
/****************
* The attach() and detach() entry points are used to create and destroy
* "instances" of the driver, where each instance represents everything
* needed to manage one actual PCMCIA card.
*/
static void xirc2ps_detach(struct pcmcia_device *p_dev); static void xirc2ps_detach(struct pcmcia_device *p_dev);
/****************
* You'll also need to prototype all the functions that will actually
* be used to talk to your device. See 'pcmem_cs' for a good example
* of a fully self-sufficient driver; the other drivers rely more or
* less on other parts of the kernel.
*/
static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id); static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id);
typedef struct local_info_t { typedef struct local_info_t {
...@@ -500,16 +478,6 @@ static const struct net_device_ops netdev_ops = { ...@@ -500,16 +478,6 @@ static const struct net_device_ops netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/****************
* xirc2ps_attach() creates an "instance" of the driver, allocating
* local data structures for one device. The device is registered
* with Card Services.
*
* The dev_link structure is initialized, but we don't actually
* configure the card at this point -- we wait until we receive a
* card insertion event.
*/
static int static int
xirc2ps_probe(struct pcmcia_device *link) xirc2ps_probe(struct pcmcia_device *link)
{ {
...@@ -539,13 +507,6 @@ xirc2ps_probe(struct pcmcia_device *link) ...@@ -539,13 +507,6 @@ xirc2ps_probe(struct pcmcia_device *link)
return xirc2ps_config(link); return xirc2ps_config(link);
} /* xirc2ps_attach */ } /* xirc2ps_attach */
/****************
* This deletes a driver "instance". The device is de-registered
* with Card Services. If it has been released, all local data
* structures are freed. Otherwise, the structures will be freed
* when the device is released.
*/
static void static void
xirc2ps_detach(struct pcmcia_device *link) xirc2ps_detach(struct pcmcia_device *link)
{ {
...@@ -733,11 +694,6 @@ static int pcmcia_get_mac_ce(struct pcmcia_device *p_dev, ...@@ -733,11 +694,6 @@ static int pcmcia_get_mac_ce(struct pcmcia_device *p_dev,
}; };
/****************
* xirc2ps_config() is scheduled to run after a CARD_INSERTION event
* is received, to configure the PCMCIA socket, and to make the
* ethernet device available to the system.
*/
static int static int
xirc2ps_config(struct pcmcia_device * link) xirc2ps_config(struct pcmcia_device * link)
{ {
...@@ -861,10 +817,6 @@ xirc2ps_config(struct pcmcia_device * link) ...@@ -861,10 +817,6 @@ xirc2ps_config(struct pcmcia_device * link)
if ((err=pcmcia_request_irq(link, xirc2ps_interrupt))) if ((err=pcmcia_request_irq(link, xirc2ps_interrupt)))
goto config_error; goto config_error;
/****************
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping.
*/
link->config_flags |= CONF_ENABLE_IRQ; link->config_flags |= CONF_ENABLE_IRQ;
if (do_sound) if (do_sound)
link->config_flags |= CONF_ENABLE_SPKR; link->config_flags |= CONF_ENABLE_SPKR;
...@@ -980,11 +932,6 @@ xirc2ps_config(struct pcmcia_device * link) ...@@ -980,11 +932,6 @@ xirc2ps_config(struct pcmcia_device * link)
return -ENODEV; return -ENODEV;
} /* xirc2ps_config */ } /* xirc2ps_config */
/****************
* After a card is removed, xirc2ps_release() will unregister the net
* device, and release the PCMCIA configuration. If the device is
* still open, this will be postponed until it is closed.
*/
static void static void
xirc2ps_release(struct pcmcia_device *link) xirc2ps_release(struct pcmcia_device *link)
{ {
......
...@@ -53,42 +53,15 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); ...@@ -53,42 +53,15 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards");
/*====================================================================*/ /*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events. They are invoked from the airo_cs
event handler.
*/
static int airo_config(struct pcmcia_device *link); static int airo_config(struct pcmcia_device *link);
static void airo_release(struct pcmcia_device *link); static void airo_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void airo_detach(struct pcmcia_device *p_dev); static void airo_detach(struct pcmcia_device *p_dev);
typedef struct local_info_t { typedef struct local_info_t {
struct net_device *eth_dev; struct net_device *eth_dev;
} local_info_t; } local_info_t;
/*======================================================================
airo_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int airo_probe(struct pcmcia_device *p_dev) static int airo_probe(struct pcmcia_device *p_dev)
{ {
local_info_t *local; local_info_t *local;
...@@ -106,15 +79,6 @@ static int airo_probe(struct pcmcia_device *p_dev) ...@@ -106,15 +79,6 @@ static int airo_probe(struct pcmcia_device *p_dev)
return airo_config(p_dev); return airo_config(p_dev);
} /* airo_attach */ } /* airo_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void airo_detach(struct pcmcia_device *link) static void airo_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "airo_detach\n"); dev_dbg(&link->dev, "airo_detach\n");
...@@ -129,14 +93,6 @@ static void airo_detach(struct pcmcia_device *link) ...@@ -129,14 +93,6 @@ static void airo_detach(struct pcmcia_device *link)
kfree(link->priv); kfree(link->priv);
} /* airo_detach */ } /* airo_detach */
/*======================================================================
airo_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
if (p_dev->config_index == 0) if (p_dev->config_index == 0)
...@@ -158,20 +114,6 @@ static int airo_config(struct pcmcia_device *link) ...@@ -158,20 +114,6 @@ static int airo_config(struct pcmcia_device *link)
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
/*
* In this loop, we scan the CIS for configuration table
* entries, each of which describes a valid card
* configuration, including voltage, IO window, memory window,
* and interrupt settings.
*
* We make no assumptions about the card to be configured: we
* use just the information available in the CIS. In an ideal
* world, this would work for any PCMCIA card, but it requires
* a complete and accurate CIS. In practice, a driver usually
* "knows" most of these things without consulting the CIS,
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); ret = pcmcia_loop_config(link, airo_cs_config_check, NULL);
if (ret) if (ret)
goto failed; goto failed;
...@@ -179,11 +121,6 @@ static int airo_config(struct pcmcia_device *link) ...@@ -179,11 +121,6 @@ static int airo_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -200,14 +137,6 @@ static int airo_config(struct pcmcia_device *link) ...@@ -200,14 +137,6 @@ static int airo_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* airo_config */ } /* airo_config */
/*======================================================================
After a card is removed, airo_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void airo_release(struct pcmcia_device *link) static void airo_release(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "airo_release\n"); dev_dbg(&link->dev, "airo_release\n");
......
...@@ -63,42 +63,15 @@ MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards"); ...@@ -63,42 +63,15 @@ MODULE_SUPPORTED_DEVICE("Atmel at76c50x PCMCIA cards");
/*====================================================================*/ /*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events. They are invoked from the atmel_cs
event handler.
*/
static int atmel_config(struct pcmcia_device *link); static int atmel_config(struct pcmcia_device *link);
static void atmel_release(struct pcmcia_device *link); static void atmel_release(struct pcmcia_device *link);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static void atmel_detach(struct pcmcia_device *p_dev); static void atmel_detach(struct pcmcia_device *p_dev);
typedef struct local_info_t { typedef struct local_info_t {
struct net_device *eth_dev; struct net_device *eth_dev;
} local_info_t; } local_info_t;
/*======================================================================
atmel_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int atmel_probe(struct pcmcia_device *p_dev) static int atmel_probe(struct pcmcia_device *p_dev)
{ {
local_info_t *local; local_info_t *local;
...@@ -116,15 +89,6 @@ static int atmel_probe(struct pcmcia_device *p_dev) ...@@ -116,15 +89,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
return atmel_config(p_dev); return atmel_config(p_dev);
} /* atmel_attach */ } /* atmel_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void atmel_detach(struct pcmcia_device *link) static void atmel_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "atmel_detach\n"); dev_dbg(&link->dev, "atmel_detach\n");
...@@ -134,14 +98,6 @@ static void atmel_detach(struct pcmcia_device *link) ...@@ -134,14 +98,6 @@ static void atmel_detach(struct pcmcia_device *link)
kfree(link->priv); kfree(link->priv);
} }
/*======================================================================
atmel_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
/* Call-back function to interrogate PCMCIA-specific information /* Call-back function to interrogate PCMCIA-specific information
about the current existance of the card */ about the current existance of the card */
static int card_present(void *arg) static int card_present(void *arg)
...@@ -176,18 +132,6 @@ static int atmel_config(struct pcmcia_device *link) ...@@ -176,18 +132,6 @@ static int atmel_config(struct pcmcia_device *link)
link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP |
CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; CONF_AUTO_AUDIO | CONF_AUTO_SET_IO;
/*
In this loop, we scan the CIS for configuration table entries,
each of which describes a valid card configuration, including
voltage, IO window, memory window, and interrupt settings.
We make no assumptions about the card to be configured: we use
just the information available in the CIS. In an ideal world,
this would work for any PCMCIA card, but it requires a complete
and accurate CIS. In practice, a driver usually "knows" most of
these things without consulting the CIS, and most client drivers
will only use the CIS to fill in implementation-defined details.
*/
if (pcmcia_loop_config(link, atmel_config_check, NULL)) if (pcmcia_loop_config(link, atmel_config_check, NULL))
goto failed; goto failed;
...@@ -196,11 +140,6 @@ static int atmel_config(struct pcmcia_device *link) ...@@ -196,11 +140,6 @@ static int atmel_config(struct pcmcia_device *link)
goto failed; goto failed;
} }
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -223,14 +162,6 @@ static int atmel_config(struct pcmcia_device *link) ...@@ -223,14 +162,6 @@ static int atmel_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} }
/*======================================================================
After a card is removed, atmel_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void atmel_release(struct pcmcia_device *link) static void atmel_release(struct pcmcia_device *link)
{ {
struct net_device *dev = ((local_info_t*)link->priv)->eth_dev; struct net_device *dev = ((local_info_t*)link->priv)->eth_dev;
......
...@@ -466,9 +466,6 @@ static void prism2_detach(struct pcmcia_device *link) ...@@ -466,9 +466,6 @@ static void prism2_detach(struct pcmcia_device *link)
} }
/* run after a CARD_INSERTION event is received to configure the PCMCIA
* socket and make the device available to the system */
static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data) static int prism2_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
if (p_dev->config_index == 0) if (p_dev->config_index == 0)
...@@ -530,11 +527,6 @@ static int prism2_config(struct pcmcia_device *link) ...@@ -530,11 +527,6 @@ static int prism2_config(struct pcmcia_device *link)
if (ret) if (ret)
goto failed_unlock; goto failed_unlock;
/*
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed_unlock; goto failed_unlock;
......
...@@ -760,15 +760,6 @@ static int if_cs_host_to_card(struct lbs_private *priv, ...@@ -760,15 +760,6 @@ static int if_cs_host_to_card(struct lbs_private *priv,
} }
/********************************************************************/
/* Card Services */
/********************************************************************/
/*
* After a card is removed, if_cs_release() will unregister the
* device, and release the PCMCIA configuration. If the device is
* still open, this will be postponed until it is closed.
*/
static void if_cs_release(struct pcmcia_device *p_dev) static void if_cs_release(struct pcmcia_device *p_dev)
{ {
struct if_cs_card *card = p_dev->priv; struct if_cs_card *card = p_dev->priv;
...@@ -784,16 +775,6 @@ static void if_cs_release(struct pcmcia_device *p_dev) ...@@ -784,16 +775,6 @@ static void if_cs_release(struct pcmcia_device *p_dev)
} }
/*
* This creates an "instance" of the driver, allocating local data
* structures for one device. The device is registered with Card
* Services.
*
* The dev_link structure is initialized, but we don't actually
* configure the card at this point -- we wait until we receive a card
* insertion event.
*/
static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data) static int if_cs_ioprobe(struct pcmcia_device *p_dev, void *priv_data)
{ {
p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
...@@ -849,11 +830,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev) ...@@ -849,11 +830,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
goto out1; goto out1;
} }
/*
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(p_dev); ret = pcmcia_enable_device(p_dev);
if (ret) { if (ret) {
lbs_pr_err("error in pcmcia_enable_device\n"); lbs_pr_err("error in pcmcia_enable_device\n");
...@@ -950,12 +926,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev) ...@@ -950,12 +926,6 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
} }
/*
* This deletes a driver "instance". The device is de-registered with
* Card Services. If it has been released, all local data structures
* are freed. Otherwise, the structures will be freed when the device
* is released.
*/
static void if_cs_detach(struct pcmcia_device *p_dev) static void if_cs_detach(struct pcmcia_device *p_dev)
{ {
struct if_cs_card *card = p_dev->priv; struct if_cs_card *card = p_dev->priv;
......
...@@ -92,14 +92,6 @@ orinoco_cs_hard_reset(struct orinoco_private *priv) ...@@ -92,14 +92,6 @@ orinoco_cs_hard_reset(struct orinoco_private *priv)
/* PCMCIA stuff */ /* PCMCIA stuff */
/********************************************************************/ /********************************************************************/
/*
* This creates an "instance" of the driver, allocating local data
* structures for one device. The device is registered with Card
* Services.
*
* The dev_link structure is initialized, but we don't actually
* configure the card at this point -- we wait until we receive a card
* insertion event. */
static int static int
orinoco_cs_probe(struct pcmcia_device *link) orinoco_cs_probe(struct pcmcia_device *link)
{ {
...@@ -119,12 +111,6 @@ orinoco_cs_probe(struct pcmcia_device *link) ...@@ -119,12 +111,6 @@ orinoco_cs_probe(struct pcmcia_device *link)
return orinoco_cs_config(link); return orinoco_cs_config(link);
} /* orinoco_cs_attach */ } /* orinoco_cs_attach */
/*
* This deletes a driver "instance". The device is de-registered with
* Card Services. If it has been released, all local data structures
* are freed. Otherwise, the structures will be freed when the device
* is released.
*/
static void orinoco_cs_detach(struct pcmcia_device *link) static void orinoco_cs_detach(struct pcmcia_device *link)
{ {
struct orinoco_private *priv = link->priv; struct orinoco_private *priv = link->priv;
...@@ -136,12 +122,6 @@ static void orinoco_cs_detach(struct pcmcia_device *link) ...@@ -136,12 +122,6 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
free_orinocodev(priv); free_orinocodev(priv);
} /* orinoco_cs_detach */ } /* orinoco_cs_detach */
/*
* orinoco_cs_config() is scheduled to run after a CARD_INSERTION
* event is received, to configure the PCMCIA socket, and to make the
* device available to the system.
*/
static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) static int orinoco_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
if (p_dev->config_index == 0) if (p_dev->config_index == 0)
...@@ -158,20 +138,6 @@ orinoco_cs_config(struct pcmcia_device *link) ...@@ -158,20 +138,6 @@ orinoco_cs_config(struct pcmcia_device *link)
int ret; int ret;
void __iomem *mem; void __iomem *mem;
/*
* In this loop, we scan the CIS for configuration table
* entries, each of which describes a valid card
* configuration, including voltage, IO window, memory window,
* and interrupt settings.
*
* We make no assumptions about the card to be configured: we
* use just the information available in the CIS. In an ideal
* world, this would work for any PCMCIA card, but it requires
* a complete and accurate CIS. In practice, a driver usually
* "knows" most of these things without consulting the CIS,
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC |
CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
if (ignore_cis_vcc) if (ignore_cis_vcc)
...@@ -199,11 +165,6 @@ orinoco_cs_config(struct pcmcia_device *link) ...@@ -199,11 +165,6 @@ orinoco_cs_config(struct pcmcia_device *link)
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
/*
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -228,11 +189,6 @@ orinoco_cs_config(struct pcmcia_device *link) ...@@ -228,11 +189,6 @@ orinoco_cs_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* orinoco_cs_config */ } /* orinoco_cs_config */
/*
* After a card is removed, orinoco_cs_release() will unregister the
* device, and release the PCMCIA configuration. If the device is
* still open, this will be postponed until it is closed.
*/
static void static void
orinoco_cs_release(struct pcmcia_device *link) orinoco_cs_release(struct pcmcia_device *link)
{ {
......
...@@ -153,14 +153,6 @@ spectrum_cs_stop_firmware(struct orinoco_private *priv, int idle) ...@@ -153,14 +153,6 @@ spectrum_cs_stop_firmware(struct orinoco_private *priv, int idle)
/* PCMCIA stuff */ /* PCMCIA stuff */
/********************************************************************/ /********************************************************************/
/*
* This creates an "instance" of the driver, allocating local data
* structures for one device. The device is registered with Card
* Services.
*
* The dev_link structure is initialized, but we don't actually
* configure the card at this point -- we wait until we receive a card
* insertion event. */
static int static int
spectrum_cs_probe(struct pcmcia_device *link) spectrum_cs_probe(struct pcmcia_device *link)
{ {
...@@ -181,12 +173,6 @@ spectrum_cs_probe(struct pcmcia_device *link) ...@@ -181,12 +173,6 @@ spectrum_cs_probe(struct pcmcia_device *link)
return spectrum_cs_config(link); return spectrum_cs_config(link);
} /* spectrum_cs_attach */ } /* spectrum_cs_attach */
/*
* This deletes a driver "instance". The device is de-registered with
* Card Services. If it has been released, all local data structures
* are freed. Otherwise, the structures will be freed when the device
* is released.
*/
static void spectrum_cs_detach(struct pcmcia_device *link) static void spectrum_cs_detach(struct pcmcia_device *link)
{ {
struct orinoco_private *priv = link->priv; struct orinoco_private *priv = link->priv;
...@@ -198,12 +184,6 @@ static void spectrum_cs_detach(struct pcmcia_device *link) ...@@ -198,12 +184,6 @@ static void spectrum_cs_detach(struct pcmcia_device *link)
free_orinocodev(priv); free_orinocodev(priv);
} /* spectrum_cs_detach */ } /* spectrum_cs_detach */
/*
* spectrum_cs_config() is scheduled to run after a CARD_INSERTION
* event is received, to configure the PCMCIA socket, and to make the
* device available to the system.
*/
static int spectrum_cs_config_check(struct pcmcia_device *p_dev, static int spectrum_cs_config_check(struct pcmcia_device *p_dev,
void *priv_data) void *priv_data)
{ {
...@@ -221,20 +201,6 @@ spectrum_cs_config(struct pcmcia_device *link) ...@@ -221,20 +201,6 @@ spectrum_cs_config(struct pcmcia_device *link)
int ret; int ret;
void __iomem *mem; void __iomem *mem;
/*
* In this loop, we scan the CIS for configuration table
* entries, each of which describes a valid card
* configuration, including voltage, IO window, memory window,
* and interrupt settings.
*
* We make no assumptions about the card to be configured: we
* use just the information available in the CIS. In an ideal
* world, this would work for any PCMCIA card, but it requires
* a complete and accurate CIS. In practice, a driver usually
* "knows" most of these things without consulting the CIS,
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC | link->config_flags |= CONF_AUTO_SET_VPP | CONF_AUTO_CHECK_VCC |
CONF_AUTO_SET_IO | CONF_ENABLE_IRQ; CONF_AUTO_SET_IO | CONF_ENABLE_IRQ;
if (ignore_cis_vcc) if (ignore_cis_vcc)
...@@ -263,11 +229,6 @@ spectrum_cs_config(struct pcmcia_device *link) ...@@ -263,11 +229,6 @@ spectrum_cs_config(struct pcmcia_device *link)
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING); hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
hw->eeprom_pda = true; hw->eeprom_pda = true;
/*
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -296,11 +257,6 @@ spectrum_cs_config(struct pcmcia_device *link) ...@@ -296,11 +257,6 @@ spectrum_cs_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* spectrum_cs_config */ } /* spectrum_cs_config */
/*
* After a card is removed, spectrum_cs_release() will unregister the
* device, and release the PCMCIA configuration. If the device is
* still open, this will be postponed until it is closed.
*/
static void static void
spectrum_cs_release(struct pcmcia_device *link) spectrum_cs_release(struct pcmcia_device *link)
{ {
......
...@@ -168,13 +168,6 @@ static int bc; ...@@ -168,13 +168,6 @@ static int bc;
*/ */
static char *phy_addr = NULL; static char *phy_addr = NULL;
/* A struct pcmcia_device structure has fields for most things that are needed
to keep track of a socket, but there will usually be some device
specific information that also needs to be kept track of. The
'priv' pointer in a struct pcmcia_device structure can be used to point to
a device-specific private data structure, like this.
*/
static unsigned int ray_mem_speed = 500; static unsigned int ray_mem_speed = 500;
/* WARNING: THIS DRIVER IS NOT CAPABLE OF HANDLING MULTIPLE DEVICES! */ /* WARNING: THIS DRIVER IS NOT CAPABLE OF HANDLING MULTIPLE DEVICES! */
...@@ -289,14 +282,6 @@ static const struct net_device_ops ray_netdev_ops = { ...@@ -289,14 +282,6 @@ static const struct net_device_ops ray_netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/*=============================================================================
ray_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
=============================================================================*/
static int ray_probe(struct pcmcia_device *p_dev) static int ray_probe(struct pcmcia_device *p_dev)
{ {
ray_dev_t *local; ray_dev_t *local;
...@@ -351,12 +336,6 @@ static int ray_probe(struct pcmcia_device *p_dev) ...@@ -351,12 +336,6 @@ static int ray_probe(struct pcmcia_device *p_dev)
return -ENOMEM; return -ENOMEM;
} /* ray_attach */ } /* ray_attach */
/*=============================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
=============================================================================*/
static void ray_detach(struct pcmcia_device *link) static void ray_detach(struct pcmcia_device *link)
{ {
struct net_device *dev; struct net_device *dev;
...@@ -379,11 +358,6 @@ static void ray_detach(struct pcmcia_device *link) ...@@ -379,11 +358,6 @@ static void ray_detach(struct pcmcia_device *link)
dev_dbg(&link->dev, "ray_cs ray_detach ending\n"); dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
} /* ray_detach */ } /* ray_detach */
/*=============================================================================
ray_config() is run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
=============================================================================*/
#define MAX_TUPLE_SIZE 128 #define MAX_TUPLE_SIZE 128
static int ray_config(struct pcmcia_device *link) static int ray_config(struct pcmcia_device *link)
{ {
...@@ -409,9 +383,6 @@ static int ray_config(struct pcmcia_device *link) ...@@ -409,9 +383,6 @@ static int ray_config(struct pcmcia_device *link)
goto failed; goto failed;
dev->irq = link->irq; dev->irq = link->irq;
/* This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -771,11 +742,7 @@ static void join_net(u_long data) ...@@ -771,11 +742,7 @@ static void join_net(u_long data)
local->card_status = CARD_DOING_ACQ; local->card_status = CARD_DOING_ACQ;
} }
/*============================================================================
After a card is removed, ray_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
=============================================================================*/
static void ray_release(struct pcmcia_device *link) static void ray_release(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
......
...@@ -77,13 +77,6 @@ ...@@ -77,13 +77,6 @@
#define WL3501_RESUME 0 #define WL3501_RESUME 0
#define WL3501_SUSPEND 1 #define WL3501_SUSPEND 1
/*
* The event() function is this driver's Card Services event handler. It will
* be called by Card Services when an appropriate card status event is
* received. The config() and release() entry points are used to configure or
* release a socket, in response to card insertion and ejection events. They
* are invoked from the wl24 event handler.
*/
static int wl3501_config(struct pcmcia_device *link); static int wl3501_config(struct pcmcia_device *link);
static void wl3501_release(struct pcmcia_device *link); static void wl3501_release(struct pcmcia_device *link);
...@@ -1868,15 +1861,6 @@ static const struct net_device_ops wl3501_netdev_ops = { ...@@ -1868,15 +1861,6 @@ static const struct net_device_ops wl3501_netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
}; };
/**
* wl3501_attach - creates an "instance" of the driver
*
* Creates an "instance" of the driver, allocating local data structures for
* one device. The device is registered with Card Services.
*
* The dev_link structure is initialized, but we don't actually configure the
* card at this point -- we wait until we receive a card insertion event.
*/
static int wl3501_probe(struct pcmcia_device *p_dev) static int wl3501_probe(struct pcmcia_device *p_dev)
{ {
struct net_device *dev; struct net_device *dev;
...@@ -1912,14 +1896,6 @@ static int wl3501_probe(struct pcmcia_device *p_dev) ...@@ -1912,14 +1896,6 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
return -ENOMEM; return -ENOMEM;
} }
/**
* wl3501_config - configure the PCMCIA socket and make eth device available
* @link - FILL_IN
*
* wl3501_config() is scheduled to run after a CARD_INSERTION event is
* received, to configure the PCMCIA socket, and to make the ethernet device
* available to the system.
*/
static int wl3501_config(struct pcmcia_device *link) static int wl3501_config(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -1950,9 +1926,6 @@ static int wl3501_config(struct pcmcia_device *link) ...@@ -1950,9 +1926,6 @@ static int wl3501_config(struct pcmcia_device *link)
if (ret) if (ret)
goto failed; goto failed;
/* This actually configures the PCMCIA socket -- setting up the I/O
* windows and the interrupt mapping. */
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -2008,14 +1981,6 @@ static int wl3501_config(struct pcmcia_device *link) ...@@ -2008,14 +1981,6 @@ static int wl3501_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} }
/**
* wl3501_release - unregister the net, release PCMCIA configuration
* @arg - link
*
* After a card is removed, wl3501_release() will unregister the net device,
* and release the PCMCIA configuration. If the device is still open, this
* will be postponed until it is closed.
*/
static void wl3501_release(struct pcmcia_device *link) static void wl3501_release(struct pcmcia_device *link)
{ {
pcmcia_disable_device(link); pcmcia_disable_device(link);
......
...@@ -80,14 +80,6 @@ static void parport_detach(struct pcmcia_device *p_dev); ...@@ -80,14 +80,6 @@ static void parport_detach(struct pcmcia_device *p_dev);
static int parport_config(struct pcmcia_device *link); static int parport_config(struct pcmcia_device *link);
static void parport_cs_release(struct pcmcia_device *); static void parport_cs_release(struct pcmcia_device *);
/*======================================================================
parport_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int parport_probe(struct pcmcia_device *link) static int parport_probe(struct pcmcia_device *link)
{ {
parport_info_t *info; parport_info_t *info;
...@@ -105,15 +97,6 @@ static int parport_probe(struct pcmcia_device *link) ...@@ -105,15 +97,6 @@ static int parport_probe(struct pcmcia_device *link)
return parport_config(link); return parport_config(link);
} /* parport_attach */ } /* parport_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void parport_detach(struct pcmcia_device *link) static void parport_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "parport_detach\n"); dev_dbg(&link->dev, "parport_detach\n");
...@@ -123,14 +106,6 @@ static void parport_detach(struct pcmcia_device *link) ...@@ -123,14 +106,6 @@ static void parport_detach(struct pcmcia_device *link)
kfree(link->priv); kfree(link->priv);
} /* parport_detach */ } /* parport_detach */
/*======================================================================
parport_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
parport device available to the system.
======================================================================*/
static int parport_config_check(struct pcmcia_device *p_dev, void *priv_data) static int parport_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH; p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
...@@ -187,14 +162,6 @@ static int parport_config(struct pcmcia_device *link) ...@@ -187,14 +162,6 @@ static int parport_config(struct pcmcia_device *link)
return -ENODEV; return -ENODEV;
} /* parport_config */ } /* parport_config */
/*======================================================================
After a card is removed, parport_cs_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void parport_cs_release(struct pcmcia_device *link) static void parport_cs_release(struct pcmcia_device *link)
{ {
parport_info_t *info = link->priv; parport_info_t *info = link->priv;
......
...@@ -1530,15 +1530,6 @@ static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt) ...@@ -1530,15 +1530,6 @@ static int nsp_eh_host_reset(struct scsi_cmnd *SCpnt)
PCMCIA functions PCMCIA functions
**********************************************************************/ **********************************************************************/
/*======================================================================
nsp_cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int nsp_cs_probe(struct pcmcia_device *link) static int nsp_cs_probe(struct pcmcia_device *link)
{ {
scsi_info_t *info; scsi_info_t *info;
...@@ -1563,12 +1554,6 @@ static int nsp_cs_probe(struct pcmcia_device *link) ...@@ -1563,12 +1554,6 @@ static int nsp_cs_probe(struct pcmcia_device *link)
} /* nsp_cs_attach */ } /* nsp_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void nsp_cs_detach(struct pcmcia_device *link) static void nsp_cs_detach(struct pcmcia_device *link)
{ {
nsp_dbg(NSP_DEBUG_INIT, "in, link=0x%p", link); nsp_dbg(NSP_DEBUG_INIT, "in, link=0x%p", link);
...@@ -1581,12 +1566,6 @@ static void nsp_cs_detach(struct pcmcia_device *link) ...@@ -1581,12 +1566,6 @@ static void nsp_cs_detach(struct pcmcia_device *link)
} /* nsp_cs_detach */ } /* nsp_cs_detach */
/*======================================================================
nsp_cs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
======================================================================*/
static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) static int nsp_cs_config_check(struct pcmcia_device *p_dev, void *priv_data)
{ {
nsp_hw_data *data = priv_data; nsp_hw_data *data = priv_data;
...@@ -1697,11 +1676,6 @@ static int nsp_cs_config(struct pcmcia_device *link) ...@@ -1697,11 +1676,6 @@ static int nsp_cs_config(struct pcmcia_device *link)
} /* nsp_cs_config */ } /* nsp_cs_config */
/*======================================================================
After a card is removed, nsp_cs_release() will unregister the net
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void nsp_cs_release(struct pcmcia_device *link) static void nsp_cs_release(struct pcmcia_device *link)
{ {
scsi_info_t *info = link->priv; scsi_info_t *info = link->priv;
......
...@@ -262,13 +262,6 @@ static const struct serial_quirk quirks[] = { ...@@ -262,13 +262,6 @@ static const struct serial_quirk quirks[] = {
static int serial_config(struct pcmcia_device * link); static int serial_config(struct pcmcia_device * link);
/*======================================================================
After a card is removed, serial_remove() will unregister
the serial device(s), and release the PCMCIA configuration.
======================================================================*/
static void serial_remove(struct pcmcia_device *link) static void serial_remove(struct pcmcia_device *link)
{ {
struct serial_info *info = link->priv; struct serial_info *info = link->priv;
...@@ -311,14 +304,6 @@ static int serial_resume(struct pcmcia_device *link) ...@@ -311,14 +304,6 @@ static int serial_resume(struct pcmcia_device *link)
return 0; return 0;
} }
/*======================================================================
serial_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
======================================================================*/
static int serial_probe(struct pcmcia_device *link) static int serial_probe(struct pcmcia_device *link)
{ {
struct serial_info *info; struct serial_info *info;
...@@ -339,15 +324,6 @@ static int serial_probe(struct pcmcia_device *link) ...@@ -339,15 +324,6 @@ static int serial_probe(struct pcmcia_device *link)
return serial_config(link); return serial_config(link);
} }
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void serial_detach(struct pcmcia_device *link) static void serial_detach(struct pcmcia_device *link)
{ {
struct serial_info *info = link->priv; struct serial_info *info = link->priv;
...@@ -631,14 +607,6 @@ static int serial_check_for_multi(struct pcmcia_device *p_dev, void *priv_data) ...@@ -631,14 +607,6 @@ static int serial_check_for_multi(struct pcmcia_device *p_dev, void *priv_data)
} }
/*======================================================================
serial_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
serial device available to the system.
======================================================================*/
static int serial_config(struct pcmcia_device * link) static int serial_config(struct pcmcia_device * link)
{ {
struct serial_info *info = link->priv; struct serial_info *info = link->priv;
......
...@@ -736,11 +736,6 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) ...@@ -736,11 +736,6 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
......
...@@ -114,40 +114,15 @@ static void das08_pcmcia_release(struct pcmcia_device *link); ...@@ -114,40 +114,15 @@ static void das08_pcmcia_release(struct pcmcia_device *link);
static int das08_pcmcia_suspend(struct pcmcia_device *p_dev); static int das08_pcmcia_suspend(struct pcmcia_device *p_dev);
static int das08_pcmcia_resume(struct pcmcia_device *p_dev); static int das08_pcmcia_resume(struct pcmcia_device *p_dev);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static int das08_pcmcia_attach(struct pcmcia_device *); static int das08_pcmcia_attach(struct pcmcia_device *);
static void das08_pcmcia_detach(struct pcmcia_device *); static void das08_pcmcia_detach(struct pcmcia_device *);
/*
You'll also need to prototype all the functions that will actually
be used to talk to your device. See 'memory_cs' for a good example
of a fully self-sufficient driver; the other drivers rely more or
less on other parts of the kernel.
*/
struct local_info_t { struct local_info_t {
struct pcmcia_device *link; struct pcmcia_device *link;
int stop; int stop;
struct bus_operations *bus; struct bus_operations *bus;
}; };
/*======================================================================
das08_pcmcia_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int das08_pcmcia_attach(struct pcmcia_device *link) static int das08_pcmcia_attach(struct pcmcia_device *link)
{ {
struct local_info_t *local; struct local_info_t *local;
...@@ -168,15 +143,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link) ...@@ -168,15 +143,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)
return 0; return 0;
} /* das08_pcmcia_attach */ } /* das08_pcmcia_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void das08_pcmcia_detach(struct pcmcia_device *link) static void das08_pcmcia_detach(struct pcmcia_device *link)
{ {
...@@ -200,15 +166,6 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev, ...@@ -200,15 +166,6 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev,
return pcmcia_request_io(p_dev); return pcmcia_request_io(p_dev);
} }
/*======================================================================
das08_pcmcia_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static void das08_pcmcia_config(struct pcmcia_device *link) static void das08_pcmcia_config(struct pcmcia_device *link)
{ {
int ret; int ret;
...@@ -226,11 +183,6 @@ static void das08_pcmcia_config(struct pcmcia_device *link) ...@@ -226,11 +183,6 @@ static void das08_pcmcia_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -242,32 +194,12 @@ static void das08_pcmcia_config(struct pcmcia_device *link) ...@@ -242,32 +194,12 @@ static void das08_pcmcia_config(struct pcmcia_device *link)
} /* das08_pcmcia_config */ } /* das08_pcmcia_config */
/*======================================================================
After a card is removed, das08_pcmcia_release() will unregister the
device, and release the PCMCIA configuration. If the device is
still open, this will be postponed until it is closed.
======================================================================*/
static void das08_pcmcia_release(struct pcmcia_device *link) static void das08_pcmcia_release(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "das08_pcmcia_release\n"); dev_dbg(&link->dev, "das08_pcmcia_release\n");
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* das08_pcmcia_release */ } /* das08_pcmcia_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int das08_pcmcia_suspend(struct pcmcia_device *link) static int das08_pcmcia_suspend(struct pcmcia_device *link)
{ {
struct local_info_t *local = link->priv; struct local_info_t *local = link->priv;
......
...@@ -434,47 +434,20 @@ static int dio700_detach(struct comedi_device *dev) ...@@ -434,47 +434,20 @@ static int dio700_detach(struct comedi_device *dev)
return 0; return 0;
}; };
/* PCMCIA crap -- watch your words, please! */
static void dio700_config(struct pcmcia_device *link); static void dio700_config(struct pcmcia_device *link);
static void dio700_release(struct pcmcia_device *link); static void dio700_release(struct pcmcia_device *link);
static int dio700_cs_suspend(struct pcmcia_device *p_dev); static int dio700_cs_suspend(struct pcmcia_device *p_dev);
static int dio700_cs_resume(struct pcmcia_device *p_dev); static int dio700_cs_resume(struct pcmcia_device *p_dev);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static int dio700_cs_attach(struct pcmcia_device *); static int dio700_cs_attach(struct pcmcia_device *);
static void dio700_cs_detach(struct pcmcia_device *); static void dio700_cs_detach(struct pcmcia_device *);
/*
You'll also need to prototype all the functions that will actually
be used to talk to your device. See 'memory_cs' for a good example
of a fully self-sufficient driver; the other drivers rely more or
less on other parts of the kernel.
*/
struct local_info_t { struct local_info_t {
struct pcmcia_device *link; struct pcmcia_device *link;
int stop; int stop;
struct bus_operations *bus; struct bus_operations *bus;
}; };
/*======================================================================
dio700_cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int dio700_cs_attach(struct pcmcia_device *link) static int dio700_cs_attach(struct pcmcia_device *link)
{ {
struct local_info_t *local; struct local_info_t *local;
...@@ -497,15 +470,6 @@ static int dio700_cs_attach(struct pcmcia_device *link) ...@@ -497,15 +470,6 @@ static int dio700_cs_attach(struct pcmcia_device *link)
return 0; return 0;
} /* dio700_cs_attach */ } /* dio700_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void dio700_cs_detach(struct pcmcia_device *link) static void dio700_cs_detach(struct pcmcia_device *link)
{ {
...@@ -521,14 +485,6 @@ static void dio700_cs_detach(struct pcmcia_device *link) ...@@ -521,14 +485,6 @@ static void dio700_cs_detach(struct pcmcia_device *link)
} /* dio700_cs_detach */ } /* dio700_cs_detach */
/*======================================================================
dio700_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev, static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data) void *priv_data)
{ {
...@@ -559,11 +515,6 @@ static void dio700_config(struct pcmcia_device *link) ...@@ -559,11 +515,6 @@ static void dio700_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret != 0) if (ret != 0)
goto failed; goto failed;
...@@ -583,18 +534,6 @@ static void dio700_release(struct pcmcia_device *link) ...@@ -583,18 +534,6 @@ static void dio700_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* dio700_release */ } /* dio700_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int dio700_cs_suspend(struct pcmcia_device *link) static int dio700_cs_suspend(struct pcmcia_device *link)
{ {
struct local_info_t *local = link->priv; struct local_info_t *local = link->priv;
......
...@@ -186,47 +186,20 @@ static int dio24_detach(struct comedi_device *dev) ...@@ -186,47 +186,20 @@ static int dio24_detach(struct comedi_device *dev)
return 0; return 0;
}; };
/* PCMCIA crap -- watch your words! */
static void dio24_config(struct pcmcia_device *link); static void dio24_config(struct pcmcia_device *link);
static void dio24_release(struct pcmcia_device *link); static void dio24_release(struct pcmcia_device *link);
static int dio24_cs_suspend(struct pcmcia_device *p_dev); static int dio24_cs_suspend(struct pcmcia_device *p_dev);
static int dio24_cs_resume(struct pcmcia_device *p_dev); static int dio24_cs_resume(struct pcmcia_device *p_dev);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static int dio24_cs_attach(struct pcmcia_device *); static int dio24_cs_attach(struct pcmcia_device *);
static void dio24_cs_detach(struct pcmcia_device *); static void dio24_cs_detach(struct pcmcia_device *);
/*
You'll also need to prototype all the functions that will actually
be used to talk to your device. See 'memory_cs' for a good example
of a fully self-sufficient driver; the other drivers rely more or
less on other parts of the kernel.
*/
struct local_info_t { struct local_info_t {
struct pcmcia_device *link; struct pcmcia_device *link;
int stop; int stop;
struct bus_operations *bus; struct bus_operations *bus;
}; };
/*======================================================================
dio24_cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int dio24_cs_attach(struct pcmcia_device *link) static int dio24_cs_attach(struct pcmcia_device *link)
{ {
struct local_info_t *local; struct local_info_t *local;
...@@ -249,15 +222,6 @@ static int dio24_cs_attach(struct pcmcia_device *link) ...@@ -249,15 +222,6 @@ static int dio24_cs_attach(struct pcmcia_device *link)
return 0; return 0;
} /* dio24_cs_attach */ } /* dio24_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void dio24_cs_detach(struct pcmcia_device *link) static void dio24_cs_detach(struct pcmcia_device *link)
{ {
...@@ -273,14 +237,6 @@ static void dio24_cs_detach(struct pcmcia_device *link) ...@@ -273,14 +237,6 @@ static void dio24_cs_detach(struct pcmcia_device *link)
} /* dio24_cs_detach */ } /* dio24_cs_detach */
/*======================================================================
dio24_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev, static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data) void *priv_data)
{ {
...@@ -310,11 +266,6 @@ static void dio24_config(struct pcmcia_device *link) ...@@ -310,11 +266,6 @@ static void dio24_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -334,18 +285,6 @@ static void dio24_release(struct pcmcia_device *link) ...@@ -334,18 +285,6 @@ static void dio24_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* dio24_release */ } /* dio24_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int dio24_cs_suspend(struct pcmcia_device *link) static int dio24_cs_suspend(struct pcmcia_device *link)
{ {
struct local_info_t *local = link->priv; struct local_info_t *local = link->priv;
......
...@@ -152,59 +152,20 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -152,59 +152,20 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return labpc_common_attach(dev, iobase, irq, 0); return labpc_common_attach(dev, iobase, irq, 0);
} }
/*====================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events. They are invoked from the dummy
event handler.
Kernel version 2.6.16 upwards uses suspend() and resume() functions
instead of an event() function.
*/
static void labpc_config(struct pcmcia_device *link); static void labpc_config(struct pcmcia_device *link);
static void labpc_release(struct pcmcia_device *link); static void labpc_release(struct pcmcia_device *link);
static int labpc_cs_suspend(struct pcmcia_device *p_dev); static int labpc_cs_suspend(struct pcmcia_device *p_dev);
static int labpc_cs_resume(struct pcmcia_device *p_dev); static int labpc_cs_resume(struct pcmcia_device *p_dev);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static int labpc_cs_attach(struct pcmcia_device *); static int labpc_cs_attach(struct pcmcia_device *);
static void labpc_cs_detach(struct pcmcia_device *); static void labpc_cs_detach(struct pcmcia_device *);
/*
You'll also need to prototype all the functions that will actually
be used to talk to your device. See 'memory_cs' for a good example
of a fully self-sufficient driver; the other drivers rely more or
less on other parts of the kernel.
*/
struct local_info_t { struct local_info_t {
struct pcmcia_device *link; struct pcmcia_device *link;
int stop; int stop;
struct bus_operations *bus; struct bus_operations *bus;
}; };
/*======================================================================
labpc_cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int labpc_cs_attach(struct pcmcia_device *link) static int labpc_cs_attach(struct pcmcia_device *link)
{ {
struct local_info_t *local; struct local_info_t *local;
...@@ -225,15 +186,6 @@ static int labpc_cs_attach(struct pcmcia_device *link) ...@@ -225,15 +186,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
return 0; return 0;
} /* labpc_cs_attach */ } /* labpc_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void labpc_cs_detach(struct pcmcia_device *link) static void labpc_cs_detach(struct pcmcia_device *link)
{ {
dev_dbg(&link->dev, "labpc_cs_detach\n"); dev_dbg(&link->dev, "labpc_cs_detach\n");
...@@ -252,14 +204,6 @@ static void labpc_cs_detach(struct pcmcia_device *link) ...@@ -252,14 +204,6 @@ static void labpc_cs_detach(struct pcmcia_device *link)
} /* labpc_cs_detach */ } /* labpc_cs_detach */
/*======================================================================
labpc_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev, static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
void *priv_data) void *priv_data)
{ {
...@@ -288,11 +232,6 @@ static void labpc_config(struct pcmcia_device *link) ...@@ -288,11 +232,6 @@ static void labpc_config(struct pcmcia_device *link)
if (!link->irq) if (!link->irq)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -311,18 +250,6 @@ static void labpc_release(struct pcmcia_device *link) ...@@ -311,18 +250,6 @@ static void labpc_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* labpc_release */ } /* labpc_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int labpc_cs_suspend(struct pcmcia_device *link) static int labpc_cs_suspend(struct pcmcia_device *link)
{ {
struct local_info_t *local = link->priv; struct local_info_t *local = link->priv;
...@@ -340,8 +267,6 @@ static int labpc_cs_resume(struct pcmcia_device *link) ...@@ -340,8 +267,6 @@ static int labpc_cs_resume(struct pcmcia_device *link)
return 0; return 0;
} /* labpc_cs_resume */ } /* labpc_cs_resume */
/*====================================================================*/
static struct pcmcia_device_id labpc_cs_ids[] = { static struct pcmcia_device_id labpc_cs_ids[] = {
/* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */ /* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */
PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103), /* daqcard-1200 */ PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103), /* daqcard-1200 */
......
...@@ -968,43 +968,14 @@ static int daqp_detach(struct comedi_device *dev) ...@@ -968,43 +968,14 @@ static int daqp_detach(struct comedi_device *dev)
======================================================================*/ ======================================================================*/
/*
The event() function is this driver's Card Services event handler.
It will be called by Card Services when an appropriate card status
event is received. The config() and release() entry points are
used to configure or release a socket, in response to card
insertion and ejection events.
Kernel version 2.6.16 upwards uses suspend() and resume() functions
instead of an event() function.
*/
static void daqp_cs_config(struct pcmcia_device *link); static void daqp_cs_config(struct pcmcia_device *link);
static void daqp_cs_release(struct pcmcia_device *link); static void daqp_cs_release(struct pcmcia_device *link);
static int daqp_cs_suspend(struct pcmcia_device *p_dev); static int daqp_cs_suspend(struct pcmcia_device *p_dev);
static int daqp_cs_resume(struct pcmcia_device *p_dev); static int daqp_cs_resume(struct pcmcia_device *p_dev);
/*
The attach() and detach() entry points are used to create and destroy
"instances" of the driver, where each instance represents everything
needed to manage one actual PCMCIA card.
*/
static int daqp_cs_attach(struct pcmcia_device *); static int daqp_cs_attach(struct pcmcia_device *);
static void daqp_cs_detach(struct pcmcia_device *); static void daqp_cs_detach(struct pcmcia_device *);
/*======================================================================
daqp_cs_attach() creates an "instance" of the driver, allocating
local data structures for one device. The device is registered
with Card Services.
The dev_link structure is initialized, but we don't actually
configure the card at this point -- we wait until we receive a
card insertion event.
======================================================================*/
static int daqp_cs_attach(struct pcmcia_device *link) static int daqp_cs_attach(struct pcmcia_device *link)
{ {
struct local_info_t *local; struct local_info_t *local;
...@@ -1035,15 +1006,6 @@ static int daqp_cs_attach(struct pcmcia_device *link) ...@@ -1035,15 +1006,6 @@ static int daqp_cs_attach(struct pcmcia_device *link)
return 0; return 0;
} /* daqp_cs_attach */ } /* daqp_cs_attach */
/*======================================================================
This deletes a driver "instance". The device is de-registered
with Card Services. If it has been released, all local data
structures are freed. Otherwise, the structures will be freed
when the device is released.
======================================================================*/
static void daqp_cs_detach(struct pcmcia_device *link) static void daqp_cs_detach(struct pcmcia_device *link)
{ {
struct local_info_t *dev = link->priv; struct local_info_t *dev = link->priv;
...@@ -1059,15 +1021,6 @@ static void daqp_cs_detach(struct pcmcia_device *link) ...@@ -1059,15 +1021,6 @@ static void daqp_cs_detach(struct pcmcia_device *link)
} /* daqp_cs_detach */ } /* daqp_cs_detach */
/*======================================================================
daqp_cs_config() is scheduled to run after a CARD_INSERTION event
is received, to configure the PCMCIA socket, and to make the
device available to the system.
======================================================================*/
static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, void *priv_data) static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev, void *priv_data)
{ {
if (p_dev->config_index == 0) if (p_dev->config_index == 0)
...@@ -1094,11 +1047,6 @@ static void daqp_cs_config(struct pcmcia_device *link) ...@@ -1094,11 +1047,6 @@ static void daqp_cs_config(struct pcmcia_device *link)
if (ret) if (ret)
goto failed; goto failed;
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
ret = pcmcia_enable_device(link); ret = pcmcia_enable_device(link);
if (ret) if (ret)
goto failed; goto failed;
...@@ -1117,18 +1065,6 @@ static void daqp_cs_release(struct pcmcia_device *link) ...@@ -1117,18 +1065,6 @@ static void daqp_cs_release(struct pcmcia_device *link)
pcmcia_disable_device(link); pcmcia_disable_device(link);
} /* daqp_cs_release */ } /* daqp_cs_release */
/*======================================================================
The card status event handler. Mostly, this schedules other
stuff to run after an event is received.
When a CARD_REMOVAL event is received, we immediately set a
private flag to block future accesses to this device. All the
functions that actually access the device should check this flag
to make sure the card is still present.
======================================================================*/
static int daqp_cs_suspend(struct pcmcia_device *link) static int daqp_cs_suspend(struct pcmcia_device *link)
{ {
struct local_info_t *local = link->priv; struct local_info_t *local = link->priv;
......
...@@ -163,27 +163,6 @@ static int wl_adapter_attach(struct pcmcia_device *link) ...@@ -163,27 +163,6 @@ static int wl_adapter_attach(struct pcmcia_device *link)
/*******************************************************************************
* wl_adapter_detach()
*******************************************************************************
*
* DESCRIPTION:
*
* This deletes a driver "instance". The device is de-registered with Card
* Services. If it has been released, then the net device is unregistered, and
* all local data structures are freed. Otherwise, the structures will be
* freed when the device is released.
*
* PARAMETERS:
*
* link - pointer to the dev_link_t structure representing the device to
* detach
*
* RETURNS:
*
* N/A
*
******************************************************************************/
static void wl_adapter_detach(struct pcmcia_device *link) static void wl_adapter_detach(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
...@@ -207,26 +186,6 @@ static void wl_adapter_detach(struct pcmcia_device *link) ...@@ -207,26 +186,6 @@ static void wl_adapter_detach(struct pcmcia_device *link)
/*============================================================================*/ /*============================================================================*/
/*******************************************************************************
* wl_adapter_release()
*******************************************************************************
*
* DESCRIPTION:
*
* After a card is removed, this routine will release the PCMCIA
* configuration. If the device is still open, this will be postponed until it
* is closed.
*
* PARAMETERS:
*
* arg - a u_long representing a pointer to a dev_link_t structure for the
* device to be released.
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_adapter_release(struct pcmcia_device *link) void wl_adapter_release(struct pcmcia_device *link)
{ {
DBG_FUNC("wl_adapter_release"); DBG_FUNC("wl_adapter_release");
...@@ -266,26 +225,6 @@ static int wl_adapter_resume(struct pcmcia_device *link) ...@@ -266,26 +225,6 @@ static int wl_adapter_resume(struct pcmcia_device *link)
return 0; return 0;
} /* wl_adapter_resume */ } /* wl_adapter_resume */
/*******************************************************************************
* wl_adapter_insert()
*******************************************************************************
*
* DESCRIPTION:
*
* wl_adapter_insert() is scheduled to run after a CARD_INSERTION event is
* received, to configure the PCMCIA socket, and to make the ethernet device
* available to the system.
*
* PARAMETERS:
*
* link - pointer to the dev_link_t structure representing the device to
* insert
*
* RETURNS:
*
* N/A
*
******************************************************************************/
void wl_adapter_insert(struct pcmcia_device *link) void wl_adapter_insert(struct pcmcia_device *link)
{ {
struct net_device *dev; struct net_device *dev;
......
...@@ -414,25 +414,6 @@ extern memimage fw_image; // firmware image to be downloaded ...@@ -414,25 +414,6 @@ extern memimage fw_image; // firmware image to be downloaded
#endif /* HCF_STA */ #endif /* HCF_STA */
/*******************************************************************************
* wl_insert()
*******************************************************************************
*
* DESCRIPTION:
*
* wl_insert() is scheduled to run after a CARD_INSERTION event is
* received, to configure the PCMCIA socket, and to make the ethernet device
* available to the system.
*
* PARAMETERS:
*
* dev - a pointer to the net_device struct of the wireless device
*
* RETURNS:
*
* TRUE or FALSE
*
******************************************************************************/
int wl_insert( struct net_device *dev ) int wl_insert( struct net_device *dev )
{ {
int result = 0; int result = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment