Lines 688-699
Link Here
|
688 |
return; |
688 |
return; |
689 |
} |
689 |
} |
690 |
|
690 |
|
|
|
691 |
#ifdef CONFIG_PM |
692 |
static int amrmo_suspend(struct pci_dev *pci_dev, u32 state) |
693 |
{ |
694 |
struct amrmo_struct *amrmo = pci_get_drvdata(pci_dev); |
695 |
|
696 |
printk(KERN_INFO "slamr: suspending %d-th card...\n", amrmo->num); |
697 |
amrmo_card_disable(amrmo->card); |
698 |
pci_save_state(pci_dev); |
699 |
pci_set_power_state(pci_dev, PCI_D3hot); |
700 |
return 0; |
701 |
} |
702 |
|
703 |
static int amrmo_resume(struct pci_dev *pci_dev) |
704 |
{ |
705 |
struct amrmo_struct *amrmo = pci_get_drvdata(pci_dev); |
706 |
int ret; |
707 |
|
708 |
pci_set_power_state(pci_dev, PCI_D0); |
709 |
pci_restore_state(pci_dev); |
710 |
printk(KERN_INFO "slamr: coming from suspend, enabling card %d ...\n", amrmo->num); |
711 |
ret = amrmo_card_enable(amrmo->card,NULL); |
712 |
if (ret) |
713 |
printk(KERN_ERR "slamr: cannot reinit card %d after suspend!\n", amrmo->num); |
714 |
|
715 |
return 0; |
716 |
} |
717 |
#endif |
691 |
|
718 |
|
692 |
static struct pci_driver amrmo_pci_driver = { |
719 |
static struct pci_driver amrmo_pci_driver = { |
693 |
.name = AMRMO_MODULE_NAME, |
720 |
.name = AMRMO_MODULE_NAME, |
694 |
.id_table = amrmo_pci_tbl, |
721 |
.id_table = amrmo_pci_tbl, |
695 |
.probe = amrmo_pci_probe, |
722 |
.probe = amrmo_pci_probe, |
696 |
.remove = amrmo_pci_remove, |
723 |
.remove = amrmo_pci_remove, |
|
|
724 |
#ifdef CONFIG_PM |
725 |
.suspend = amrmo_suspend, |
726 |
.resume = amrmo_resume, |
727 |
#endif |
697 |
}; |
728 |
}; |
698 |
|
729 |
|
699 |
|
730 |
|