]> err.no Git - linux-2.6/commitdiff
[PATCH] oss: remove deprecated PM interface from cs4281 driver
authorPatrick Mochel <mochel@digitalimplant.org>
Fri, 6 Jan 2006 08:15:14 +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 cs4281 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 that this driver has been obsoleted by an ALSA equivalent.

Note that this driver has hooks for PCI power management, but does not
implement the ->suspend()/->resume() methods.

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/cs4281/cs4281m.c
sound/oss/cs4281/cs4281pm-24.c

index adc689649fe1c06e5ce3d6fc568d4b523fd0741d..46dd41dc2a340bba08b71118a4d6df36796fa430 100644 (file)
@@ -298,7 +298,6 @@ struct cs4281_state {
        struct cs4281_pipeline pl[CS4281_NUMBER_OF_PIPELINES];
 };
 
-#include <linux/pm_legacy.h>
 #include "cs4281pm-24.c"
 
 #if CSDEBUG
@@ -4256,9 +4255,6 @@ static void __devinit cs4281_InitPM(struct cs4281_state *s)
 static int __devinit cs4281_probe(struct pci_dev *pcidev,
                                  const struct pci_device_id *pciid)
 {
-#ifndef NOT_CS4281_PM
-       struct pm_dev *pmdev;
-#endif
        struct cs4281_state *s;
        dma_addr_t dma_mask;
        mm_segment_t fs;
@@ -4374,19 +4370,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev,
        }
 #ifndef NOT_CS4281_PM
        cs4281_InitPM(s);
-       pmdev = cs_pm_register(PM_PCI_DEV, PM_PCI_ID(pcidev), cs4281_pm_callback);
-       if (pmdev)
-       {
-               CS_DBGOUT(CS_INIT | CS_PM, 4, printk(KERN_INFO
-                        "cs4281: probe() pm_register() succeeded (%p).\n", pmdev));
-               pmdev->data = s;
-       }
-       else
-       {
-               CS_DBGOUT(CS_INIT | CS_PM | CS_ERROR, 0, printk(KERN_INFO
-                        "cs4281: probe() pm_register() failed (%p).\n", pmdev));
-               s->pm.flags |= CS4281_PM_NOT_REGISTERED;
-       }
+       s->pm.flags |= CS4281_PM_NOT_REGISTERED;
 #endif
 
        pci_set_master(pcidev); // enable bus mastering 
@@ -4487,9 +4471,6 @@ static int __init cs4281_init_module(void)
 static void __exit cs4281_cleanup_module(void)
 {
        pci_unregister_driver(&cs4281_pci_driver);
-#ifndef NOT_CS4281_PM
-       cs_pm_unregister_all(cs4281_pm_callback);
-#endif
        CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,
                  printk(KERN_INFO "cs4281: cleanup_cs4281() finished\n"));
 }
index d2a453aff0aa17ee174101f60f150667ffab0680..90cbd7679534aff28d119239fa2d146c00516eb5 100644 (file)
@@ -27,9 +27,6 @@
 #ifndef NOT_CS4281_PM
 #include <linux/pm.h>
 
-#define cs_pm_register(a, b, c) pm_register((a), (b), (c));
-#define cs_pm_unregister_all(a) pm_unregister_all((a));
-
 static int cs4281_suspend(struct cs4281_state *s);
 static int cs4281_resume(struct cs4281_state *s);
 /* 
@@ -41,42 +38,6 @@ static int cs4281_resume(struct cs4281_state *s);
 #define CS4281_SUSPEND_TBL cs4281_suspend_null
 #define CS4281_RESUME_TBL cs4281_resume_null
 
-static int cs4281_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
-{
-       struct cs4281_state *state;
-
-       CS_DBGOUT(CS_PM, 2, printk(KERN_INFO 
-               "cs4281: cs4281_pm_callback dev=%p rqst=0x%x state=%p\n",
-                       dev,(unsigned)rqst,data));
-       state = (struct cs4281_state *) dev->data;
-       if (state) {
-               switch(rqst) {
-                       case PM_SUSPEND:
-                               CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
-                                       "cs4281: PM suspend request\n"));
-                               if(cs4281_suspend(state))
-                               {
-                                   CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
-                                       "cs4281: PM suspend request refused\n"));
-                                       return 1; 
-                               }
-                               break;
-                       case PM_RESUME:
-                               CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
-                                       "cs4281: PM resume request\n"));
-                               if(cs4281_resume(state))
-                               {
-                                   CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO
-                                       "cs4281: PM resume request refused\n"));
-                                       return 1;
-                               }
-                               break;
-               }
-       }
-
-       return 0;
-}
-
 #else /* CS4281_PM */
 #define CS4281_SUSPEND_TBL cs4281_suspend_null
 #define CS4281_RESUME_TBL cs4281_resume_null