aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avma1_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-01 18:02:33 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:52 -0500
commit8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch)
treead99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/isdn/hisax/avma1_cs.c
parent50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (diff)
[PATCH] pcmcia: default suspend and resume handling
In all but one case, the suspend and resume functions of PCMCIA drivers contain mostly of calls to pcmcia_release_configuration() and pcmcia_request_configuration(). Therefore, move this code out of the drivers and into the core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/isdn/hisax/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 845fa14e1bae..5e847cfb96f8 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -383,28 +383,6 @@ static void avma1cs_release(dev_link_t *link)
383 pcmcia_disable_device(link->handle); 383 pcmcia_disable_device(link->handle);
384} /* avma1cs_release */ 384} /* avma1cs_release */
385 385
386static int avma1cs_suspend(struct pcmcia_device *dev)
387{
388 dev_link_t *link = dev_to_instance(dev);
389
390 link->state |= DEV_SUSPEND;
391 if (link->state & DEV_CONFIG)
392 pcmcia_release_configuration(link->handle);
393
394 return 0;
395}
396
397static int avma1cs_resume(struct pcmcia_device *dev)
398{
399 dev_link_t *link = dev_to_instance(dev);
400
401 link->state &= ~DEV_SUSPEND;
402 if (link->state & DEV_CONFIG)
403 pcmcia_request_configuration(link->handle, &link->conf);
404
405 return 0;
406}
407
408 386
409static struct pcmcia_device_id avma1cs_ids[] = { 387static struct pcmcia_device_id avma1cs_ids[] = {
410 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb), 388 PCMCIA_DEVICE_PROD_ID12("AVM", "ISDN A", 0x95d42008, 0xadc9d4bb),
@@ -421,10 +399,8 @@ static struct pcmcia_driver avma1cs_driver = {
421 .probe = avma1cs_attach, 399 .probe = avma1cs_attach,
422 .remove = avma1cs_detach, 400 .remove = avma1cs_detach,
423 .id_table = avma1cs_ids, 401 .id_table = avma1cs_ids,
424 .suspend = avma1cs_suspend,
425 .resume = avma1cs_resume,
426}; 402};
427 403
428/*====================================================================*/ 404/*====================================================================*/
429 405
430static int __init init_avma1_cs(void) 406static int __init init_avma1_cs(void)