X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm_native.c;h=e97b2d162cc72f3140792ec9725bf71078011183;hb=ec33b309101bb2904e9fe20252f7760e254d05ec;hp=03c17159dd8e0fe48f9625af9dfd979038a5adff;hpb=ef88b7dba2b47c70037a34a599d383462bb74bd3;p=powerpc.git diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 03c17159dd..e97b2d162c 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -859,6 +859,7 @@ static struct action_ops snd_pcm_action_start = { /** * snd_pcm_start + * @substream: the PCM substream instance * * Start all linked streams. */ @@ -908,6 +909,8 @@ static struct action_ops snd_pcm_action_stop = { /** * snd_pcm_stop + * @substream: the PCM substream instance + * @state: PCM state after stopping the stream * * Try to stop all running streams in the substream group. * The state of each stream is changed to the given value after that unconditionally. @@ -919,6 +922,7 @@ int snd_pcm_stop(snd_pcm_substream_t *substream, int state) /** * snd_pcm_drain_done + * @substream: the PCM substream * * Stop the DMA only when the given stream is playback. * The state is changed to SETUP. @@ -1040,6 +1044,7 @@ static struct action_ops snd_pcm_action_suspend = { /** * snd_pcm_suspend + * @substream: the PCM substream * * Trigger SUSPEND to all linked streams. * After this call, all streams are changed to SUSPENDED state. @@ -1057,6 +1062,7 @@ int snd_pcm_suspend(snd_pcm_substream_t *substream) /** * snd_pcm_suspend_all + * @pcm: the PCM instance * * Trigger SUSPEND to all substreams in the given pcm. * After this call, all streams are changed to SUSPENDED state. @@ -1272,6 +1278,9 @@ static struct action_ops snd_pcm_action_prepare = { /** * snd_pcm_prepare + * @substream: the PCM substream instance + * + * Prepare the PCM substream to be triggerable. */ int snd_pcm_prepare(snd_pcm_substream_t *substream) { @@ -1992,7 +2001,7 @@ static int snd_pcm_open_file(struct file *file, snd_assert(rpcm_file != NULL, return -EINVAL); *rpcm_file = NULL; - pcm_file = kcalloc(1, sizeof(*pcm_file), GFP_KERNEL); + pcm_file = kzalloc(sizeof(*pcm_file), GFP_KERNEL); if (pcm_file == NULL) { return -ENOMEM; } @@ -2940,8 +2949,7 @@ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, uns return NOPAGE_OOM; runtime = substream->runtime; page = virt_to_page(runtime->status); - if (!PageReserved(page)) - get_page(page); + get_page(page); if (type) *type = VM_FAULT_MINOR; return page; @@ -2983,8 +2991,7 @@ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, un return NOPAGE_OOM; runtime = substream->runtime; page = virt_to_page(runtime->control); - if (!PageReserved(page)) - get_page(page); + get_page(page); if (type) *type = VM_FAULT_MINOR; return page; @@ -3057,8 +3064,7 @@ static struct page *snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsign vaddr = runtime->dma_area + offset; page = virt_to_page(vaddr); } - if (!PageReserved(page)) - get_page(page); + get_page(page); if (type) *type = VM_FAULT_MINOR; return page;