diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 15:39:24 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-05 15:39:24 -0500 |
commit | 7211bb9b64f17b23834d91fc3d0c1d78671ee9a8 (patch) | |
tree | 541909f86c31fee97cd70d28ec2fe5c23e1ceb02 /sound/core | |
parent | f1e691a24955ea987f021f378324fb5003b1b208 (diff) | |
parent | 70d9d825e0a5a78ec1dacaaaf5c72ff5b0206fab (diff) |
Merge branch 'master'
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/init.c | 16 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 9 | ||||
-rw-r--r-- | sound/core/sound.c | 2 |
3 files changed, 10 insertions, 17 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index c72a79115cca..41e224986f35 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
29 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
30 | #include <linux/pm.h> | 30 | #include <linux/pm.h> |
31 | #include <linux/platform_device.h> | ||
32 | |||
31 | #include <sound/core.h> | 33 | #include <sound/core.h> |
32 | #include <sound/control.h> | 34 | #include <sound/control.h> |
33 | #include <sound/info.h> | 35 | #include <sound/info.h> |
@@ -676,8 +678,8 @@ struct snd_generic_device { | |||
676 | #define SND_GENERIC_NAME "snd_generic" | 678 | #define SND_GENERIC_NAME "snd_generic" |
677 | 679 | ||
678 | #ifdef CONFIG_PM | 680 | #ifdef CONFIG_PM |
679 | static int snd_generic_suspend(struct device *dev, pm_message_t state, u32 level); | 681 | static int snd_generic_suspend(struct device *dev, pm_message_t state); |
680 | static int snd_generic_resume(struct device *dev, u32 level); | 682 | static int snd_generic_resume(struct device *dev); |
681 | #endif | 683 | #endif |
682 | 684 | ||
683 | /* initialized in sound.c */ | 685 | /* initialized in sound.c */ |
@@ -818,13 +820,10 @@ int snd_card_set_pm_callback(snd_card_t *card, | |||
818 | 820 | ||
819 | #ifdef CONFIG_SND_GENERIC_DRIVER | 821 | #ifdef CONFIG_SND_GENERIC_DRIVER |
820 | /* suspend/resume callbacks for snd_generic platform device */ | 822 | /* suspend/resume callbacks for snd_generic platform device */ |
821 | static int snd_generic_suspend(struct device *dev, pm_message_t state, u32 level) | 823 | static int snd_generic_suspend(struct device *dev, pm_message_t state) |
822 | { | 824 | { |
823 | snd_card_t *card; | 825 | snd_card_t *card; |
824 | 826 | ||
825 | if (level != SUSPEND_DISABLE) | ||
826 | return 0; | ||
827 | |||
828 | card = get_snd_generic_card(dev); | 827 | card = get_snd_generic_card(dev); |
829 | if (card->power_state == SNDRV_CTL_POWER_D3hot) | 828 | if (card->power_state == SNDRV_CTL_POWER_D3hot) |
830 | return 0; | 829 | return 0; |
@@ -834,13 +833,10 @@ static int snd_generic_suspend(struct device *dev, pm_message_t state, u32 level | |||
834 | return 0; | 833 | return 0; |
835 | } | 834 | } |
836 | 835 | ||
837 | static int snd_generic_resume(struct device *dev, u32 level) | 836 | static int snd_generic_resume(struct device *dev) |
838 | { | 837 | { |
839 | snd_card_t *card; | 838 | snd_card_t *card; |
840 | 839 | ||
841 | if (level != RESUME_ENABLE) | ||
842 | return 0; | ||
843 | |||
844 | card = get_snd_generic_card(dev); | 840 | card = get_snd_generic_card(dev); |
845 | if (card->power_state == SNDRV_CTL_POWER_D0) | 841 | if (card->power_state == SNDRV_CTL_POWER_D0) |
846 | return 0; | 842 | return 0; |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 67abebabf83e..e97b2d162cc7 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2949,8 +2949,7 @@ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, uns | |||
2949 | return NOPAGE_OOM; | 2949 | return NOPAGE_OOM; |
2950 | runtime = substream->runtime; | 2950 | runtime = substream->runtime; |
2951 | page = virt_to_page(runtime->status); | 2951 | page = virt_to_page(runtime->status); |
2952 | if (!PageReserved(page)) | 2952 | get_page(page); |
2953 | get_page(page); | ||
2954 | if (type) | 2953 | if (type) |
2955 | *type = VM_FAULT_MINOR; | 2954 | *type = VM_FAULT_MINOR; |
2956 | return page; | 2955 | return page; |
@@ -2992,8 +2991,7 @@ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, un | |||
2992 | return NOPAGE_OOM; | 2991 | return NOPAGE_OOM; |
2993 | runtime = substream->runtime; | 2992 | runtime = substream->runtime; |
2994 | page = virt_to_page(runtime->control); | 2993 | page = virt_to_page(runtime->control); |
2995 | if (!PageReserved(page)) | 2994 | get_page(page); |
2996 | get_page(page); | ||
2997 | if (type) | 2995 | if (type) |
2998 | *type = VM_FAULT_MINOR; | 2996 | *type = VM_FAULT_MINOR; |
2999 | return page; | 2997 | return page; |
@@ -3066,8 +3064,7 @@ static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsign | |||
3066 | vaddr = runtime->dma_area + offset; | 3064 | vaddr = runtime->dma_area + offset; |
3067 | page = virt_to_page(vaddr); | 3065 | page = virt_to_page(vaddr); |
3068 | } | 3066 | } |
3069 | if (!PageReserved(page)) | 3067 | get_page(page); |
3070 | get_page(page); | ||
3071 | if (type) | 3068 | if (type) |
3072 | *type = VM_FAULT_MINOR; | 3069 | *type = VM_FAULT_MINOR; |
3073 | return page; | 3070 | return page; |
diff --git a/sound/core/sound.c b/sound/core/sound.c index 9e76bddb2c0b..b57519a3e3d9 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c | |||
@@ -231,7 +231,7 @@ int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg, | |||
231 | devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); | 231 | devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); |
232 | if (card) | 232 | if (card) |
233 | device = card->dev; | 233 | device = card->dev; |
234 | class_device_create(sound_class, MKDEV(major, minor), device, "%s", name); | 234 | class_device_create(sound_class, NULL, MKDEV(major, minor), device, "%s", name); |
235 | 235 | ||
236 | up(&sound_mutex); | 236 | up(&sound_mutex); |
237 | return 0; | 237 | return 0; |