Commit e7c045c14bffcab2d329e86b80dc8ff7d528e05b

Authored by Patrick Mochel
Committed by Linus Torvalds
1 parent e5e2fa7857

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

This change removes the old, deprecated interface from the ad1848 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.

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>

Showing 1 changed file with 0 additions and 92 deletions Side-by-side Diff

... ... @@ -46,8 +46,6 @@
46 46 #include <linux/interrupt.h>
47 47 #include <linux/module.h>
48 48 #include <linux/stddef.h>
49   -#include <linux/pm.h>
50   -#include <linux/pm_legacy.h>
51 49 #include <linux/isapnp.h>
52 50 #include <linux/pnp.h>
53 51 #include <linux/spinlock.h>
... ... @@ -105,9 +103,6 @@
105 103 int irq_ok;
106 104 mixer_ents *mix_devices;
107 105 int mixer_output_port;
108   -
109   - /* Power management */
110   - struct pm_dev *pmdev;
111 106 } ad1848_info;
112 107  
113 108 typedef struct ad1848_port_info
... ... @@ -201,7 +196,6 @@
201 196 static void ad1848_halt_input(int dev);
202 197 static void ad1848_halt_output(int dev);
203 198 static void ad1848_trigger(int dev, int bits);
204   -static int ad1848_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data);
205 199  
206 200 #ifndef EXCLUDE_TIMERS
207 201 static int ad1848_tmr_install(int dev);
... ... @@ -2027,10 +2021,6 @@
2027 2021  
2028 2022 nr_ad1848_devs++;
2029 2023  
2030   - devc->pmdev = pm_register(PM_ISA_DEV, my_dev, ad1848_pm_callback);
2031   - if (devc->pmdev)
2032   - devc->pmdev->data = devc;
2033   -
2034 2024 ad1848_init_hw(devc);
2035 2025  
2036 2026 if (irq > 0)
... ... @@ -2197,9 +2187,6 @@
2197 2187 if(mixer>=0)
2198 2188 sound_unload_mixerdev(mixer);
2199 2189  
2200   - if (devc->pmdev)
2201   - pm_unregister(devc->pmdev);
2202   -
2203 2190 nr_ad1848_devs--;
2204 2191 for ( ; i < nr_ad1848_devs ; i++)
2205 2192 adev_info[i] = adev_info[i+1];
... ... @@ -2810,85 +2797,6 @@
2810 2797 return 1;
2811 2798 }
2812 2799 #endif /* EXCLUDE_TIMERS */
2813   -
2814   -static int ad1848_suspend(ad1848_info *devc)
2815   -{
2816   - unsigned long flags;
2817   -
2818   - spin_lock_irqsave(&devc->lock,flags);
2819   -
2820   - ad_mute(devc);
2821   -
2822   - spin_unlock_irqrestore(&devc->lock,flags);
2823   - return 0;
2824   -}
2825   -
2826   -static int ad1848_resume(ad1848_info *devc)
2827   -{
2828   - int mixer_levels[32], i;
2829   -
2830   - /* Thinkpad is a bit more of PITA than normal. The BIOS tends to
2831   - restore it in a different config to the one we use. Need to
2832   - fix this somehow */
2833   -
2834   - /* store old mixer levels */
2835   - memcpy(mixer_levels, devc->levels, sizeof (mixer_levels));
2836   - ad1848_init_hw(devc);
2837   -
2838   - /* restore mixer levels */
2839   - for (i = 0; i < 32; i++)
2840   - ad1848_mixer_set(devc, devc->dev_no, mixer_levels[i]);
2841   -
2842   - if (!devc->subtype) {
2843   - static signed char interrupt_bits[12] = { -1, -1, -1, -1, -1, 0x00, -1, 0x08, -1, 0x10, 0x18, 0x20 };
2844   - static char dma_bits[4] = { 1, 2, 0, 3 };
2845   - unsigned long flags;
2846   - signed char bits;
2847   - char dma2_bit = 0;
2848   -
2849   - int config_port = devc->base + 0;
2850   -
2851   - bits = interrupt_bits[devc->irq];
2852   - if (bits == -1) {
2853   - printk(KERN_ERR "MSS: Bad IRQ %d\n", devc->irq);
2854   - return -1;
2855   - }
2856   -
2857   - spin_lock_irqsave(&devc->lock,flags);
2858   -
2859   - outb((bits | 0x40), config_port);
2860   -
2861   - if (devc->dma2 != -1 && devc->dma2 != devc->dma1)
2862   - if ( (devc->dma1 == 0 && devc->dma2 == 1) ||
2863   - (devc->dma1 == 1 && devc->dma2 == 0) ||
2864   - (devc->dma1 == 3 && devc->dma2 == 0))
2865   - dma2_bit = 0x04;
2866   -
2867   - outb((bits | dma_bits[devc->dma1] | dma2_bit), config_port);
2868   - spin_unlock_irqrestore(&devc->lock,flags);
2869   - }
2870   -
2871   - return 0;
2872   -}
2873   -
2874   -static int ad1848_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
2875   -{
2876   - ad1848_info *devc = dev->data;
2877   - if (devc) {
2878   - DEB(printk("ad1848: pm event received: 0x%x\n", rqst));
2879   -
2880   - switch (rqst) {
2881   - case PM_SUSPEND:
2882   - ad1848_suspend(devc);
2883   - break;
2884   - case PM_RESUME:
2885   - ad1848_resume(devc);
2886   - break;
2887   - }
2888   - }
2889   - return 0;
2890   -}
2891   -
2892 2800  
2893 2801 EXPORT_SYMBOL(ad1848_detect);
2894 2802 EXPORT_SYMBOL(ad1848_init);