diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-15 08:38:38 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-09-29 17:20:25 +0200 |
commit | 2262054e74b4b26ed56a8535c1259f6c6c2862a4 (patch) | |
tree | fbcd0aa7879408b9676c2df6c7514e5d7428880a /drivers/staging | |
parent | 06b3a1d12f41b592972643f8b84015d6c03dc576 (diff) |
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: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/cb_das16_cs.c | 5 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/das08_cs.c | 68 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_daq_700.c | 61 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_daq_dio24.c | 61 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_labpc_cs.c | 75 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/quatech_daqp_cs.c | 64 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_cs.c | 61 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_main.c | 19 |
8 files changed, 0 insertions, 414 deletions
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index a885cd7cfd7f..0345b4caba73 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -736,11 +736,6 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link) if (!link->irq) 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); if (ret) goto failed; diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index def167eac1d8..0b32a2df7768 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -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_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 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 pcmcia_device *link; int stop; 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) { struct local_info_t *local; @@ -168,15 +143,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link) return 0; } /* 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) { @@ -200,15 +166,6 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *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) { int ret; @@ -226,11 +183,6 @@ static void das08_pcmcia_config(struct pcmcia_device *link) if (!link->irq) 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); if (ret) goto failed; @@ -242,32 +194,12 @@ failed: } /* 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) { dev_dbg(&link->dev, "das08_pcmcia_release\n"); pcmcia_disable_device(link); } /* 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) { struct local_info_t *local = link->priv; diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 9cc8401765bd..fc772a8a55c6 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -434,47 +434,20 @@ static int dio700_detach(struct comedi_device *dev) return 0; }; -/* PCMCIA crap -- watch your words, please! */ - static void dio700_config(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_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 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 pcmcia_device *link; int stop; 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) { struct local_info_t *local; @@ -497,15 +470,6 @@ static int dio700_cs_attach(struct pcmcia_device *link) return 0; } /* 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) { @@ -521,14 +485,6 @@ static void dio700_cs_detach(struct pcmcia_device *link) } /* 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, void *priv_data) { @@ -559,11 +515,6 @@ static void dio700_config(struct pcmcia_device *link) if (!link->irq) 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); if (ret != 0) goto failed; @@ -583,18 +534,6 @@ static void dio700_release(struct pcmcia_device *link) pcmcia_disable_device(link); } /* 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) { struct local_info_t *local = link->priv; diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index b3f7c66e25c2..c9c28584db67 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -186,47 +186,20 @@ static int dio24_detach(struct comedi_device *dev) return 0; }; -/* PCMCIA crap -- watch your words! */ - static void dio24_config(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_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 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 pcmcia_device *link; int stop; 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) { struct local_info_t *local; @@ -249,15 +222,6 @@ static int dio24_cs_attach(struct pcmcia_device *link) return 0; } /* 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) { @@ -273,14 +237,6 @@ static void dio24_cs_detach(struct pcmcia_device *link) } /* 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, void *priv_data) { @@ -310,11 +266,6 @@ static void dio24_config(struct pcmcia_device *link) if (!link->irq) 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); if (ret) goto failed; @@ -334,18 +285,6 @@ static void dio24_release(struct pcmcia_device *link) pcmcia_disable_device(link); } /* 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) { struct local_info_t *local = link->priv; diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 6b7c5d043b0a..6facbc8bf776 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -152,59 +152,20 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) 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_release(struct pcmcia_device *link); static int labpc_cs_suspend(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 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 pcmcia_device *link; int stop; 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) { struct local_info_t *local; @@ -225,15 +186,6 @@ static int labpc_cs_attach(struct pcmcia_device *link) return 0; } /* 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) { dev_dbg(&link->dev, "labpc_cs_detach\n"); @@ -252,14 +204,6 @@ static void labpc_cs_detach(struct pcmcia_device *link) } /* 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, void *priv_data) { @@ -288,11 +232,6 @@ static void labpc_config(struct pcmcia_device *link) if (!link->irq) 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); if (ret) goto failed; @@ -311,18 +250,6 @@ static void labpc_release(struct pcmcia_device *link) pcmcia_disable_device(link); } /* 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) { struct local_info_t *local = link->priv; @@ -340,8 +267,6 @@ static int labpc_cs_resume(struct pcmcia_device *link) return 0; } /* labpc_cs_resume */ -/*====================================================================*/ - static struct pcmcia_device_id labpc_cs_ids[] = { /* N.B. These IDs should match those in labpc_cs_boards (ni_labpc.c) */ PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0103), /* daqcard-1200 */ diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 32fecf57868d..ebba9bb47777 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -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_release(struct pcmcia_device *link); static int daqp_cs_suspend(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 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) { struct local_info_t *local; @@ -1035,15 +1006,6 @@ static int daqp_cs_attach(struct pcmcia_device *link) return 0; } /* 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) { struct local_info_t *dev = link->priv; @@ -1059,15 +1021,6 @@ static void daqp_cs_detach(struct pcmcia_device *link) } /* 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) { if (p_dev->config_index == 0) @@ -1094,11 +1047,6 @@ static void daqp_cs_config(struct pcmcia_device *link) if (ret) 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); if (ret) goto failed; @@ -1117,18 +1065,6 @@ static void daqp_cs_release(struct pcmcia_device *link) pcmcia_disable_device(link); } /* 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) { struct local_info_t *local = link->priv; diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c index aa3cc516fe18..6555891e149c 100644 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c @@ -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) { struct net_device *dev = link->priv; @@ -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) { DBG_FUNC("wl_adapter_release"); @@ -266,26 +225,6 @@ static int wl_adapter_resume(struct pcmcia_device *link) return 0; } /* 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) { struct net_device *dev; diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c index 88d0d472142f..8e3536acbf46 100644 --- a/drivers/staging/wlags49_h2/wl_main.c +++ b/drivers/staging/wlags49_h2/wl_main.c @@ -414,25 +414,6 @@ extern memimage fw_image; // firmware image to be downloaded #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 result = 0; |