aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/avma1_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/avma1_cs.c')
-rw-r--r--drivers/isdn/hisax/avma1_cs.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index 5f5a5ae740d2..433cec4269a3 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -445,6 +445,28 @@ static void avma1cs_release(dev_link_t *link)
445 avma1cs_detach(link); 445 avma1cs_detach(link);
446} /* avma1cs_release */ 446} /* avma1cs_release */
447 447
448static int avma1cs_suspend(struct pcmcia_device *dev)
449{
450 dev_link_t *link = dev_to_instance(dev);
451
452 link->state |= DEV_SUSPEND;
453 if (link->state & DEV_CONFIG)
454 pcmcia_release_configuration(link->handle);
455
456 return 0;
457}
458
459static int avma1cs_resume(struct pcmcia_device *dev)
460{
461 dev_link_t *link = dev_to_instance(dev);
462
463 link->state &= ~DEV_SUSPEND;
464 if (link->state & DEV_CONFIG)
465 pcmcia_request_configuration(link->handle, &link->conf);
466
467 return 0;
468}
469
448/*====================================================================== 470/*======================================================================
449 471
450 The card status event handler. Mostly, this schedules other 472 The card status event handler. Mostly, this schedules other
@@ -475,20 +497,6 @@ static int avma1cs_event(event_t event, int priority,
475 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 497 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
476 avma1cs_config(link); 498 avma1cs_config(link);
477 break; 499 break;
478 case CS_EVENT_PM_SUSPEND:
479 link->state |= DEV_SUSPEND;
480 /* Fall through... */
481 case CS_EVENT_RESET_PHYSICAL:
482 if (link->state & DEV_CONFIG)
483 pcmcia_release_configuration(link->handle);
484 break;
485 case CS_EVENT_PM_RESUME:
486 link->state &= ~DEV_SUSPEND;
487 /* Fall through... */
488 case CS_EVENT_CARD_RESET:
489 if (link->state & DEV_CONFIG)
490 pcmcia_request_configuration(link->handle, &link->conf);
491 break;
492 } 500 }
493 return 0; 501 return 0;
494} /* avma1cs_event */ 502} /* avma1cs_event */
@@ -509,6 +517,8 @@ static struct pcmcia_driver avma1cs_driver = {
509 .event = avma1cs_event, 517 .event = avma1cs_event,
510 .detach = avma1cs_detach, 518 .detach = avma1cs_detach,
511 .id_table = avma1cs_ids, 519 .id_table = avma1cs_ids,
520 .suspend = avma1cs_suspend,
521 .resume = avma1cs_resume,
512}; 522};
513 523
514/*====================================================================*/ 524/*====================================================================*/