Commit 76cd48a3 authored by Patrick Mochel's avatar Patrick Mochel Committed by Linus Torvalds

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

This change removes the old, deprecated interface from the nm256 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.
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 53052539
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pm.h>
#include <linux/pm_legacy.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include "sound_config.h" #include "sound_config.h"
...@@ -49,7 +47,6 @@ static int nm256_grabInterrupt (struct nm256_info *card); ...@@ -49,7 +47,6 @@ static int nm256_grabInterrupt (struct nm256_info *card);
static int nm256_releaseInterrupt (struct nm256_info *card); static int nm256_releaseInterrupt (struct nm256_info *card);
static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy); static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy);
static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy); static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy);
static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data);
/* These belong in linux/pci.h. */ /* These belong in linux/pci.h. */
#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005
...@@ -992,15 +989,6 @@ nm256_install_mixer (struct nm256_info *card) ...@@ -992,15 +989,6 @@ nm256_install_mixer (struct nm256_info *card)
return 0; return 0;
} }
/* Perform a full reset on the hardware; this is invoked when an APM
resume event occurs. */
static void
nm256_full_reset (struct nm256_info *card)
{
nm256_initHw (card);
ac97_reset (&(card->mdev));
}
/* /*
* See if the signature left by the NM256 BIOS is intact; if so, we use * See if the signature left by the NM256 BIOS is intact; if so, we use
* the associated address as the end of our audio buffer in the video * the associated address as the end of our audio buffer in the video
...@@ -1053,7 +1041,6 @@ static int __devinit ...@@ -1053,7 +1041,6 @@ static int __devinit
nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr)
{ {
struct nm256_info *card; struct nm256_info *card;
struct pm_dev *pmdev;
int x; int x;
if (pci_enable_device(pcidev)) if (pci_enable_device(pcidev))
...@@ -1234,43 +1221,10 @@ nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) ...@@ -1234,43 +1221,10 @@ nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr)
nm256_install_mixer (card); nm256_install_mixer (card);
pmdev = pm_register(PM_PCI_DEV, PM_PCI_ID(pcidev), handle_pm_event);
if (pmdev)
pmdev->data = card;
return 1; return 1;
} }
/*
* PM event handler, so the card is properly reinitialized after a power
* event.
*/
static int
handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data)
{
struct nm256_info *crd = (struct nm256_info*) dev->data;
if (crd) {
switch (rqst) {
case PM_SUSPEND:
break;
case PM_RESUME:
{
int playing = crd->playing;
nm256_full_reset (crd);
/*
* A little ugly, but that's ok; pretend the
* block we were playing is done.
*/
if (playing)
DMAbuf_outputintr (crd->dev_for_play, 1);
}
break;
}
}
return 0;
}
static int __devinit static int __devinit
nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid) nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid)
{ {
...@@ -1696,7 +1650,6 @@ static int __init do_init_nm256(void) ...@@ -1696,7 +1650,6 @@ static int __init do_init_nm256(void)
static void __exit cleanup_nm256 (void) static void __exit cleanup_nm256 (void)
{ {
pci_unregister_driver(&nm256_pci_driver); pci_unregister_driver(&nm256_pci_driver);
pm_unregister_all (&handle_pm_event);
} }
module_init(do_init_nm256); module_init(do_init_nm256);
......
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