aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/cs46xx.c
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@digitalimplant.org>2006-01-06 03:15:17 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:41 -0500
commit94661e7c33e6e3001be07d76d3a87eaa41dad3df (patch)
tree830e59bcc2ea6fee5bbef89af2858c387dc25ebe /sound/oss/cs46xx.c
parentee77e2754247d011a11f572788040cda2493c998 (diff)
[PATCH] oss: remove deprecated PM interface from cs46xx driver
This change removes the old, deprecated interface from the cs46xx driver, including the pm_{,un}register() calls, the local storage of the pmdev object and the reference to the old header files. This change is done to assist in eradicating the users of the legacy interface so as to help facilitate the removal of the interface itself. Note this driver has PCI PM hooks which are set properly. It also has the ability to trigger suspend/resume from an ioctl. This functionality was not touched, though it could use a serious review if this driver continues to persist in the mainline tree.. Note that this driver has been obsoleted by an ALSA equivalent. Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/cs46xx.c')
-rw-r--r--sound/oss/cs46xx.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
index cb998e8c0fdd..0da4d93f04a6 100644
--- a/sound/oss/cs46xx.c
+++ b/sound/oss/cs46xx.c
@@ -391,10 +391,6 @@ static void cs461x_clear_serial_FIFOs(struct cs_card *card, int type);
391static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state); 391static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state);
392static int cs46xx_resume_tbl(struct pci_dev *pcidev); 392static int cs46xx_resume_tbl(struct pci_dev *pcidev);
393 393
394#ifndef CS46XX_ACPI_SUPPORT
395static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
396#endif
397
398#if CSDEBUG 394#if CSDEBUG
399 395
400/* DEBUG ROUTINES */ 396/* DEBUG ROUTINES */
@@ -5320,7 +5316,6 @@ static const char fndmsg[] = KERN_INFO "cs46xx: Found %d audio device(s).\n";
5320static int __devinit cs46xx_probe(struct pci_dev *pci_dev, 5316static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
5321 const struct pci_device_id *pciid) 5317 const struct pci_device_id *pciid)
5322{ 5318{
5323 struct pm_dev *pmdev;
5324 int i,j; 5319 int i,j;
5325 u16 ss_card, ss_vendor; 5320 u16 ss_card, ss_vendor;
5326 struct cs_card *card; 5321 struct cs_card *card;
@@ -5530,22 +5525,6 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
5530 PCI_SET_DMA_MASK(pci_dev, dma_mask); 5525 PCI_SET_DMA_MASK(pci_dev, dma_mask);
5531 list_add(&card->list, &cs46xx_devs); 5526 list_add(&card->list, &cs46xx_devs);
5532 5527
5533 pmdev = cs_pm_register(PM_PCI_DEV, PM_PCI_ID(pci_dev), cs46xx_pm_callback);
5534 if (pmdev)
5535 {
5536 CS_DBGOUT(CS_INIT | CS_PM, 4, printk(KERN_INFO
5537 "cs46xx: probe() pm_register() succeeded (%p).\n",
5538 pmdev));
5539 pmdev->data = card;
5540 }
5541 else
5542 {
5543 CS_DBGOUT(CS_INIT | CS_PM | CS_ERROR, 2, printk(KERN_INFO
5544 "cs46xx: probe() pm_register() failed (%p).\n",
5545 pmdev));
5546 card->pm.flags |= CS46XX_PM_NOT_REGISTERED;
5547 }
5548
5549 CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=%p\n", 5528 CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=%p\n",
5550 (unsigned)card->pm.flags,card)); 5529 (unsigned)card->pm.flags,card));
5551 5530
@@ -5727,7 +5706,6 @@ static int __init cs46xx_init_module(void)
5727static void __exit cs46xx_cleanup_module(void) 5706static void __exit cs46xx_cleanup_module(void)
5728{ 5707{
5729 pci_unregister_driver(&cs46xx_pci_driver); 5708 pci_unregister_driver(&cs46xx_pci_driver);
5730 cs_pm_unregister_all(cs46xx_pm_callback);
5731 CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, 5709 CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,
5732 printk(KERN_INFO "cs46xx: cleanup_cs46xx() finished\n")); 5710 printk(KERN_INFO "cs46xx: cleanup_cs46xx() finished\n"));
5733} 5711}
@@ -5735,44 +5713,6 @@ static void __exit cs46xx_cleanup_module(void)
5735module_init(cs46xx_init_module); 5713module_init(cs46xx_init_module);
5736module_exit(cs46xx_cleanup_module); 5714module_exit(cs46xx_cleanup_module);
5737 5715
5738#ifndef CS46XX_ACPI_SUPPORT
5739static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
5740{
5741 struct cs_card *card;
5742
5743 CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
5744 "cs46xx: cs46xx_pm_callback dev=%p rqst=0x%x card=%p\n",
5745 dev,(unsigned)rqst,data));
5746 card = (struct cs_card *) dev->data;
5747 if (card) {
5748 switch(rqst) {
5749 case PM_SUSPEND:
5750 CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
5751 "cs46xx: PM suspend request\n"));
5752 if(cs46xx_suspend(card, PMSG_SUSPEND))
5753 {
5754 CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
5755 "cs46xx: PM suspend request refused\n"));
5756 return 1;
5757 }
5758 break;
5759 case PM_RESUME:
5760 CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
5761 "cs46xx: PM resume request\n"));
5762 if(cs46xx_resume(card))
5763 {
5764 CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
5765 "cs46xx: PM resume request refused\n"));
5766 return 1;
5767 }
5768 break;
5769 }
5770 }
5771
5772 return 0;
5773}
5774#endif
5775
5776#if CS46XX_ACPI_SUPPORT 5716#if CS46XX_ACPI_SUPPORT
5777static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state) 5717static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state)
5778{ 5718{