Commit ee77e275 authored by Patrick Mochel's avatar Patrick Mochel Committed by Linus Torvalds

[PATCH] oss: remove deprecated PM interface from cs4281 driver

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: default avatarPatrick Mochel <mochel@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e7c045c1
...@@ -298,7 +298,6 @@ struct cs4281_state { ...@@ -298,7 +298,6 @@ struct cs4281_state {
struct cs4281_pipeline pl[CS4281_NUMBER_OF_PIPELINES]; struct cs4281_pipeline pl[CS4281_NUMBER_OF_PIPELINES];
}; };
#include <linux/pm_legacy.h>
#include "cs4281pm-24.c" #include "cs4281pm-24.c"
#if CSDEBUG #if CSDEBUG
...@@ -4256,9 +4255,6 @@ static void __devinit cs4281_InitPM(struct cs4281_state *s) ...@@ -4256,9 +4255,6 @@ static void __devinit cs4281_InitPM(struct cs4281_state *s)
static int __devinit cs4281_probe(struct pci_dev *pcidev, static int __devinit cs4281_probe(struct pci_dev *pcidev,
const struct pci_device_id *pciid) const struct pci_device_id *pciid)
{ {
#ifndef NOT_CS4281_PM
struct pm_dev *pmdev;
#endif
struct cs4281_state *s; struct cs4281_state *s;
dma_addr_t dma_mask; dma_addr_t dma_mask;
mm_segment_t fs; mm_segment_t fs;
...@@ -4374,19 +4370,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev, ...@@ -4374,19 +4370,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev,
} }
#ifndef NOT_CS4281_PM #ifndef NOT_CS4281_PM
cs4281_InitPM(s); cs4281_InitPM(s);
pmdev = cs_pm_register(PM_PCI_DEV, PM_PCI_ID(pcidev), cs4281_pm_callback); s->pm.flags |= CS4281_PM_NOT_REGISTERED;
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;
}
#endif #endif
pci_set_master(pcidev); // enable bus mastering pci_set_master(pcidev); // enable bus mastering
...@@ -4487,9 +4471,6 @@ static int __init cs4281_init_module(void) ...@@ -4487,9 +4471,6 @@ static int __init cs4281_init_module(void)
static void __exit cs4281_cleanup_module(void) static void __exit cs4281_cleanup_module(void)
{ {
pci_unregister_driver(&cs4281_pci_driver); 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, CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,
printk(KERN_INFO "cs4281: cleanup_cs4281() finished\n")); printk(KERN_INFO "cs4281: cleanup_cs4281() finished\n"));
} }
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#ifndef NOT_CS4281_PM #ifndef NOT_CS4281_PM
#include <linux/pm.h> #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_suspend(struct cs4281_state *s);
static int cs4281_resume(struct cs4281_state *s); static int cs4281_resume(struct cs4281_state *s);
/* /*
...@@ -41,42 +38,6 @@ 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_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_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 */ #else /* CS4281_PM */
#define CS4281_SUSPEND_TBL cs4281_suspend_null #define CS4281_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_null #define CS4281_RESUME_TBL cs4281_resume_null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment