diff options
author | Patrick Mochel <mochel@digitalimplant.org> | 2006-01-06 03:15:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:41 -0500 |
commit | 76cd48a397f126ea883835f5889ee1837596f021 (patch) | |
tree | efd303b842cd7083ee2e224e44e63dfd3ffa2b71 /sound/oss | |
parent | 53052539f3e2b29ccaf2064b0d3b8cee51d05621 (diff) |
[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: 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')
-rw-r--r-- | sound/oss/nm256_audio.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index 0ce2c404a730..42d8f05689c2 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/pm.h> | ||
28 | #include <linux/pm_legacy.h> | ||
29 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
30 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
31 | #include "sound_config.h" | 29 | #include "sound_config.h" |
@@ -49,7 +47,6 @@ static int nm256_grabInterrupt (struct nm256_info *card); | |||
49 | static int nm256_releaseInterrupt (struct nm256_info *card); | 47 | static int nm256_releaseInterrupt (struct nm256_info *card); |
50 | static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy); | 48 | static irqreturn_t nm256_interrupt (int irq, void *dev_id, struct pt_regs *dummy); |
51 | static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy); | 49 | static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id, struct pt_regs *dummy); |
52 | static int handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data); | ||
53 | 50 | ||
54 | /* These belong in linux/pci.h. */ | 51 | /* These belong in linux/pci.h. */ |
55 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 | 52 | #define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 |
@@ -992,15 +989,6 @@ nm256_install_mixer (struct nm256_info *card) | |||
992 | return 0; | 989 | return 0; |
993 | } | 990 | } |
994 | 991 | ||
995 | /* Perform a full reset on the hardware; this is invoked when an APM | ||
996 | resume event occurs. */ | ||
997 | static void | ||
998 | nm256_full_reset (struct nm256_info *card) | ||
999 | { | ||
1000 | nm256_initHw (card); | ||
1001 | ac97_reset (&(card->mdev)); | ||
1002 | } | ||
1003 | |||
1004 | /* | 992 | /* |
1005 | * See if the signature left by the NM256 BIOS is intact; if so, we use | 993 | * See if the signature left by the NM256 BIOS is intact; if so, we use |
1006 | * the associated address as the end of our audio buffer in the video | 994 | * the associated address as the end of our audio buffer in the video |
@@ -1053,7 +1041,6 @@ static int __devinit | |||
1053 | nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) | 1041 | nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) |
1054 | { | 1042 | { |
1055 | struct nm256_info *card; | 1043 | struct nm256_info *card; |
1056 | struct pm_dev *pmdev; | ||
1057 | int x; | 1044 | int x; |
1058 | 1045 | ||
1059 | if (pci_enable_device(pcidev)) | 1046 | if (pci_enable_device(pcidev)) |
@@ -1234,43 +1221,10 @@ nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) | |||
1234 | 1221 | ||
1235 | nm256_install_mixer (card); | 1222 | nm256_install_mixer (card); |
1236 | 1223 | ||
1237 | pmdev = pm_register(PM_PCI_DEV, PM_PCI_ID(pcidev), handle_pm_event); | ||
1238 | if (pmdev) | ||
1239 | pmdev->data = card; | ||
1240 | |||
1241 | return 1; | 1224 | return 1; |
1242 | } | 1225 | } |
1243 | 1226 | ||
1244 | 1227 | ||
1245 | /* | ||
1246 | * PM event handler, so the card is properly reinitialized after a power | ||
1247 | * event. | ||
1248 | */ | ||
1249 | static int | ||
1250 | handle_pm_event (struct pm_dev *dev, pm_request_t rqst, void *data) | ||
1251 | { | ||
1252 | struct nm256_info *crd = (struct nm256_info*) dev->data; | ||
1253 | if (crd) { | ||
1254 | switch (rqst) { | ||
1255 | case PM_SUSPEND: | ||
1256 | break; | ||
1257 | case PM_RESUME: | ||
1258 | { | ||
1259 | int playing = crd->playing; | ||
1260 | nm256_full_reset (crd); | ||
1261 | /* | ||
1262 | * A little ugly, but that's ok; pretend the | ||
1263 | * block we were playing is done. | ||
1264 | */ | ||
1265 | if (playing) | ||
1266 | DMAbuf_outputintr (crd->dev_for_play, 1); | ||
1267 | } | ||
1268 | break; | ||
1269 | } | ||
1270 | } | ||
1271 | return 0; | ||
1272 | } | ||
1273 | |||
1274 | static int __devinit | 1228 | static int __devinit |
1275 | nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid) | 1229 | nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid) |
1276 | { | 1230 | { |
@@ -1696,7 +1650,6 @@ static int __init do_init_nm256(void) | |||
1696 | static void __exit cleanup_nm256 (void) | 1650 | static void __exit cleanup_nm256 (void) |
1697 | { | 1651 | { |
1698 | pci_unregister_driver(&nm256_pci_driver); | 1652 | pci_unregister_driver(&nm256_pci_driver); |
1699 | pm_unregister_all (&handle_pm_event); | ||
1700 | } | 1653 | } |
1701 | 1654 | ||
1702 | module_init(do_init_nm256); | 1655 | module_init(do_init_nm256); |