Skip to content

Commit

Permalink
pcmcia: remove obsolete and wrong comments
Browse files Browse the repository at this point in the history
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: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Sep 29, 2010
1 parent 06b3a1d commit 2262054
Show file tree
Hide file tree
Showing 35 changed files with 3 additions and 1,526 deletions.
45 changes: 0 additions & 45 deletions drivers/ide/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,6 @@ static int ide_config(struct pcmcia_device *);

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)
{
ide_info_t *info;
Expand All @@ -102,15 +91,6 @@ static int ide_probe(struct pcmcia_device *link)
return ide_config(link);
} /* 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)
{
ide_info_t *info = link->priv;
Expand Down Expand Up @@ -184,14 +164,6 @@ static struct ide_host *idecs_register(unsigned long io, unsigned long ctl,
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)
{
int *is_kme = priv_data;
Expand Down Expand Up @@ -275,14 +247,6 @@ static int ide_config(struct pcmcia_device *link)
return -ENODEV;
} /* 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)
{
ide_info_t *info = link->priv;
Expand All @@ -308,15 +272,6 @@ static void ide_release(struct pcmcia_device *link)
} /* 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[] = {
PCMCIA_DEVICE_FUNC_ID(4),
PCMCIA_DEVICE_MANF_CARD(0x0000, 0x0000), /* Corsair */
Expand Down
51 changes: 0 additions & 51 deletions drivers/isdn/hardware/avm/avm_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 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);

/*======================================================================
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)
{
/* General socket configuration */
Expand All @@ -80,28 +52,12 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
return avmcs_config(p_dev);
} /* 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)
{
avmcs_release(link);
} /* 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)
{
p_dev->resource[0]->end = 16;
Expand Down Expand Up @@ -185,13 +141,6 @@ static int avmcs_config(struct pcmcia_device *link)

} /* 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)
{
Expand Down
57 changes: 0 additions & 57 deletions drivers/isdn/hisax/avma1_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 ;


/*======================================================================
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)
{
dev_dbg(&p_dev->dev, "avma1cs_attach()\n");
Expand All @@ -84,30 +55,13 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
return avma1cs_config(p_dev);
} /* 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)
{
dev_dbg(&link->dev, "avma1cs_detach(0x%p)\n", link);
avma1cs_release(link);
kfree(link->priv);
} /* 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)
{
p_dev->resource[0]->end = 16;
Expand Down Expand Up @@ -180,14 +134,6 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
return 0;
} /* 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)
{
unsigned long minor = (unsigned long) link->priv;
Expand All @@ -200,7 +146,6 @@ static void avma1cs_release(struct pcmcia_device *link)
pcmcia_disable_device(link);
} /* avma1cs_release */


static struct pcmcia_device_id avma1cs_ids[] = {
PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
PCMCIA_DEVICE_PROD_ID12("ISDN", "CARD", 0x8d9761c8, 0x01c5aa7b),
Expand All @@ -216,8 +161,6 @@ static struct pcmcia_driver avma1cs_driver = {
.id_table = avma1cs_ids,
};

/*====================================================================*/

static int __init init_avma1_cs(void)
{
return pcmcia_register_driver(&avma1cs_driver);
Expand Down
55 changes: 0 additions & 55 deletions drivers/isdn/hisax/elsa_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,8 @@ MODULE_LICENSE("Dual MPL/GPL");
static int protocol = 2; /* EURO-ISDN Default */
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 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;

typedef struct local_info_t {
Expand All @@ -91,18 +73,6 @@ typedef struct local_info_t {
int cardnr;
} 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)
{
local_info_t *local;
Expand All @@ -121,15 +91,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
return elsa_cs_config(link);
} /* 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)
{
local_info_t *info = link->priv;
Expand All @@ -142,14 +103,6 @@ static void __devexit elsa_cs_detach(struct pcmcia_device *link)
kfree(info);
} /* 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)
{
int j;
Expand Down Expand Up @@ -215,14 +168,6 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
return -ENODEV;
} /* 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)
{
local_info_t *local = link->priv;
Expand Down
Loading

0 comments on commit 2262054

Please sign in to comment.