diff options
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/aloop.c | 24 | ||||
-rw-r--r-- | sound/drivers/dummy.c | 23 | ||||
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 3 | ||||
-rw-r--r-- | sound/drivers/mpu401/mpu401_uart.c | 1 | ||||
-rw-r--r-- | sound/drivers/mtpav.c | 3 | ||||
-rw-r--r-- | sound/drivers/mts64.c | 3 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 15 | ||||
-rw-r--r-- | sound/drivers/portman2x4.c | 3 | ||||
-rw-r--r-- | sound/drivers/serial-u16550.c | 3 | ||||
-rw-r--r-- | sound/drivers/virmidi.c | 3 | ||||
-rw-r--r-- | sound/drivers/vx/vx_core.c | 2 |
11 files changed, 49 insertions, 34 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 8b5c36f4d30..5a34355e78e 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -1176,11 +1176,10 @@ static int __devexit loopback_remove(struct platform_device *devptr) return 0; } -#ifdef CONFIG_PM -static int loopback_suspend(struct platform_device *pdev, - pm_message_t state) +#ifdef CONFIG_PM_SLEEP +static int loopback_suspend(struct device *pdev) { - struct snd_card *card = platform_get_drvdata(pdev); + struct snd_card *card = dev_get_drvdata(pdev); struct loopback *loopback = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1190,13 +1189,18 @@ static int loopback_suspend(struct platform_device *pdev, return 0; } -static int loopback_resume(struct platform_device *pdev) +static int loopback_resume(struct device *pdev) { - struct snd_card *card = platform_get_drvdata(pdev); + struct snd_card *card = dev_get_drvdata(pdev); snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } + +static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume); +#define LOOPBACK_PM_OPS &loopback_pm +#else +#define LOOPBACK_PM_OPS NULL #endif #define SND_LOOPBACK_DRIVER "snd_aloop" @@ -1204,12 +1208,10 @@ static int loopback_resume(struct platform_device *pdev) static struct platform_driver loopback_driver = { .probe = loopback_probe, .remove = __devexit_p(loopback_remove), -#ifdef CONFIG_PM - .suspend = loopback_suspend, - .resume = loopback_resume, -#endif .driver = { - .name = SND_LOOPBACK_DRIVER + .name = SND_LOOPBACK_DRIVER, + .owner = THIS_MODULE, + .pm = LOOPBACK_PM_OPS, }, }; diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index ad9434fd637..54bb6644a59 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -1064,10 +1064,10 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr) return 0; } -#ifdef CONFIG_PM -static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state) +#ifdef CONFIG_PM_SLEEP +static int snd_dummy_suspend(struct device *pdev) { - struct snd_card *card = platform_get_drvdata(pdev); + struct snd_card *card = dev_get_drvdata(pdev); struct snd_dummy *dummy = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1075,13 +1075,18 @@ static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state) return 0; } -static int snd_dummy_resume(struct platform_device *pdev) +static int snd_dummy_resume(struct device *pdev) { - struct snd_card *card = platform_get_drvdata(pdev); + struct snd_card *card = dev_get_drvdata(pdev); snd_power_change_state(card, SNDRV_CTL_POWER_D0); return 0; } + +static SIMPLE_DEV_PM_OPS(snd_dummy_pm, snd_dummy_suspend, snd_dummy_resume); +#define SND_DUMMY_PM_OPS &snd_dummy_pm +#else +#define SND_DUMMY_PM_OPS NULL #endif #define SND_DUMMY_DRIVER "snd_dummy" @@ -1089,12 +1094,10 @@ static int snd_dummy_resume(struct platform_device *pdev) static struct platform_driver snd_dummy_driver = { .probe = snd_dummy_probe, .remove = __devexit_p(snd_dummy_remove), -#ifdef CONFIG_PM - .suspend = snd_dummy_suspend, - .resume = snd_dummy_resume, -#endif .driver = { - .name = SND_DUMMY_DRIVER + .name = SND_DUMMY_DRIVER, + .owner = THIS_MODULE, + .pm = SND_DUMMY_PM_OPS, }, }; diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index 86f5fbc2da7..bc03a2046c9 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -139,7 +139,8 @@ static struct platform_driver snd_mpu401_driver = { .probe = snd_mpu401_probe, .remove = __devexit_p(snd_mpu401_remove), .driver = { - .name = SND_MPU401_DRIVER + .name = SND_MPU401_DRIVER, + .owner = THIS_MODULE, }, }; diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 1cff331a228..4608c2ca43f 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c @@ -554,6 +554,7 @@ int snd_mpu401_uart_new(struct snd_card *card, int device, spin_lock_init(&mpu->output_lock); spin_lock_init(&mpu->timer_lock); mpu->hardware = hardware; + mpu->irq = -1; if (! (info_flags & MPU401_INFO_INTEGRATED)) { int res_size = hardware == MPU401_HW_PC98II ? 4 : 2; mpu->res = request_region(port, res_size, "MPU401 UART"); diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index 76930793fb6..cad73af3860 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -759,7 +759,8 @@ static struct platform_driver snd_mtpav_driver = { .probe = snd_mtpav_probe, .remove = __devexit_p(snd_mtpav_remove), .driver = { - .name = SND_MTPAV_DRIVER + .name = SND_MTPAV_DRIVER, + .owner = THIS_MODULE, }, }; diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 621e60e2029..2d5514b0a29 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -1040,7 +1040,8 @@ static struct platform_driver snd_mts64_driver = { .probe = snd_mts64_probe, .remove = __devexit_p(snd_mts64_remove), .driver = { - .name = PLATFORM_DRIVER + .name = PLATFORM_DRIVER, + .owner = THIS_MODULE, } }; diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 99704e6a2e2..ef171295f6d 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c @@ -199,17 +199,20 @@ static void pcsp_stop_beep(struct snd_pcsp *chip) pcspkr_stop_sound(); } -#ifdef CONFIG_PM -static int pcsp_suspend(struct platform_device *dev, pm_message_t state) +#ifdef CONFIG_PM_SLEEP +static int pcsp_suspend(struct device *dev) { - struct snd_pcsp *chip = platform_get_drvdata(dev); + struct snd_pcsp *chip = dev_get_drvdata(dev); pcsp_stop_beep(chip); snd_pcm_suspend_all(chip->pcm); return 0; } + +static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL); +#define PCSP_PM_OPS &pcsp_pm #else -#define pcsp_suspend NULL -#endif /* CONFIG_PM */ +#define PCSP_PM_OPS NULL +#endif /* CONFIG_PM_SLEEP */ static void pcsp_shutdown(struct platform_device *dev) { @@ -221,10 +224,10 @@ static struct platform_driver pcsp_platform_driver = { .driver = { .name = "pcspkr", .owner = THIS_MODULE, + .pm = PCSP_PM_OPS, }, .probe = pcsp_probe, .remove = __devexit_p(pcsp_remove), - .suspend = pcsp_suspend, .shutdown = pcsp_shutdown, }; diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 3e32bd3d95d..8364855ed14 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -829,7 +829,8 @@ static struct platform_driver snd_portman_driver = { .probe = snd_portman_probe, .remove = __devexit_p(snd_portman_remove), .driver = { - .name = PLATFORM_DRIVER + .name = PLATFORM_DRIVER, + .owner = THIS_MODULE, } }; diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index b2d0e8e49be..86700671d1a 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -995,7 +995,8 @@ static struct platform_driver snd_serial_driver = { .probe = snd_serial_probe, .remove = __devexit_p( snd_serial_remove), .driver = { - .name = SND_SERIAL_DRIVER + .name = SND_SERIAL_DRIVER, + .owner = THIS_MODULE, }, }; diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index 9d97478a18b..d7d514df905 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -142,7 +142,8 @@ static struct platform_driver snd_virmidi_driver = { .probe = snd_virmidi_probe, .remove = __devexit_p(snd_virmidi_remove), .driver = { - .name = SND_VIRMIDI_DRIVER + .name = SND_VIRMIDI_DRIVER, + .owner = THIS_MODULE, }, }; diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index b8e515999bc..de5055a3b0d 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -725,7 +725,7 @@ EXPORT_SYMBOL(snd_vx_dsp_load); /* * suspend */ -int snd_vx_suspend(struct vx_core *chip, pm_message_t state) +int snd_vx_suspend(struct vx_core *chip) { unsigned int i; |