[PATCH] oss: remove deprecated PM interface from cs46xx driver
authorPatrick Mochel <mochel@digitalimplant.org>
Fri, 6 Jan 2006 08:15:17 +0000 (00:15 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:41 +0000 (08:33 -0800)
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>
sound/oss/cs46xx.c
sound/oss/cs46xxpm-24.h

index cb998e8c0fdd51f844fd30ada385adda9587af8c..0da4d93f04a65d3d3b9d688190704997d00c7ab7 100644 (file)
@@ -391,10 +391,6 @@ static void cs461x_clear_serial_FIFOs(struct cs_card *card, int type);
 static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state);
 static int cs46xx_resume_tbl(struct pci_dev *pcidev);
 
-#ifndef CS46XX_ACPI_SUPPORT
-static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
-#endif
-
 #if CSDEBUG
 
 /* DEBUG ROUTINES */
@@ -5320,7 +5316,6 @@ static const char fndmsg[] = KERN_INFO "cs46xx: Found %d audio device(s).\n";
 static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
                                  const struct pci_device_id *pciid)
 {
-       struct pm_dev *pmdev;
        int i,j;
        u16 ss_card, ss_vendor;
        struct cs_card *card;
@@ -5530,22 +5525,6 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
        PCI_SET_DMA_MASK(pci_dev, dma_mask);
        list_add(&card->list, &cs46xx_devs);
 
-       pmdev = cs_pm_register(PM_PCI_DEV, PM_PCI_ID(pci_dev), cs46xx_pm_callback);
-       if (pmdev)
-       {
-               CS_DBGOUT(CS_INIT | CS_PM, 4, printk(KERN_INFO
-                        "cs46xx: probe() pm_register() succeeded (%p).\n",
-                               pmdev));
-               pmdev->data = card;
-       }
-       else
-       {
-               CS_DBGOUT(CS_INIT | CS_PM | CS_ERROR, 2, printk(KERN_INFO
-                        "cs46xx: probe() pm_register() failed (%p).\n",
-                               pmdev));
-               card->pm.flags |= CS46XX_PM_NOT_REGISTERED;
-       }
-
        CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=%p\n",
                (unsigned)card->pm.flags,card));
 
@@ -5727,7 +5706,6 @@ static int __init cs46xx_init_module(void)
 static void __exit cs46xx_cleanup_module(void)
 {
        pci_unregister_driver(&cs46xx_pci_driver);
-       cs_pm_unregister_all(cs46xx_pm_callback);
        CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,
                  printk(KERN_INFO "cs46xx: cleanup_cs46xx() finished\n"));
 }
@@ -5735,44 +5713,6 @@ static void __exit cs46xx_cleanup_module(void)
 module_init(cs46xx_init_module);
 module_exit(cs46xx_cleanup_module);
 
-#ifndef CS46XX_ACPI_SUPPORT
-static int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
-       struct cs_card *card;
-
-       CS_DBGOUT(CS_PM, 2, printk(KERN_INFO 
-               "cs46xx: cs46xx_pm_callback dev=%p rqst=0x%x card=%p\n",
-                       dev,(unsigned)rqst,data));
-       card = (struct cs_card *) dev->data;
-       if (card) {
-               switch(rqst) {
-                       case PM_SUSPEND:
-                               CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
-                                       "cs46xx: PM suspend request\n"));
-                               if(cs46xx_suspend(card, PMSG_SUSPEND))
-                               {
-                                   CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
-                                       "cs46xx: PM suspend request refused\n"));
-                                       return 1; 
-                               }
-                               break;
-                       case PM_RESUME:
-                               CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
-                                       "cs46xx: PM resume request\n"));
-                               if(cs46xx_resume(card))
-                               {
-                                   CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
-                                       "cs46xx: PM resume request refused\n"));
-                                       return 1;
-                               }
-                               break;
-               }
-       }
-
-       return 0;
-}
-#endif
-
 #if CS46XX_ACPI_SUPPORT
 static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state)
 {
index e220bd7240f14c1e0132d0d3b94131525e05b61e..ad82db84d013d6f4adf6e16c39cebfe42f58243b 100644 (file)
 */
 static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state);
 static int cs46xx_resume_tbl(struct pci_dev *pcidev);
-#define cs_pm_register(a, b, c)  NULL
-#define cs_pm_unregister_all(a) 
 #define CS46XX_SUSPEND_TBL cs46xx_suspend_tbl
 #define CS46XX_RESUME_TBL cs46xx_resume_tbl
 #else
-#define cs_pm_register(a, b, c) pm_register((a), (b), (c));
-#define cs_pm_unregister_all(a) pm_unregister_all((a));
 #define CS46XX_SUSPEND_TBL cs46xx_null
 #define CS46XX_RESUME_TBL cs46xx_null
 #endif