Skip to content

Commit

Permalink
[PATCH] v4l: 818: cleanup some unnecessary alsa memory (de/)allocations
Browse files Browse the repository at this point in the history
- Cleanup some unnecessary ALSA memory (de/)allocations

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ricardo Cerqueira authored and Linus Torvalds committed Nov 9, 2005
1 parent ac9cd97 commit e8b23c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions drivers/media/video/saa7134/saa7134-alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,15 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime)
*
* Called on initialization, right before the PCM preparation
* Usually used in ALSA to allocate the DMA, but since we don't use the
* ALSA DMA I'm almost sure this isn't necessary.
* ALSA DMA it does nothing
*
*/

static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream,
snd_pcm_hw_params_t * hw_params)
{

return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
return 0;


}
Expand All @@ -538,7 +538,7 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream,

static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream)
{
return snd_pcm_lib_free_pages(substream);
return 0;
}

/*
Expand Down Expand Up @@ -670,9 +670,6 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device)
pcm->private_data = saa7134;
pcm->info_flags = 0;
strcpy(pcm->name, "SAA7134 PCM");
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
snd_dma_pci_data(saa7134->pci),
128*1024, 256*1024);
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/media/video/saa7134/saa7134-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)

for (start = 0; start<4; start++) {
if (b[start] == 0x80) {
code=b[(start+3)%4];
parity=b[(start+2)%4];
code=b[(start+3)%4];
parity=b[(start+2)%4];
}
}

Expand Down

0 comments on commit e8b23c0

Please sign in to comment.