diff options
author | Ricardo Cerqueira <v4l@cerqueira.org> | 2005-11-09 00:37:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:22 -0500 |
commit | e8b23c0238887e1987d82ec0014a7a1fe010e724 (patch) | |
tree | ce8aa283b7960eb3bfdadceedee728539d025d3d | |
parent | ac9cd97640a8bcad75dc7305761365c3e339bbc5 (diff) |
[PATCH] v4l: 818: cleanup some unnecessary alsa memory (de/)allocations
- 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>
-rw-r--r-- | drivers/media/video/saa7134/saa7134-alsa.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index e7c3691fc500..fb6334a7ee86 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -512,7 +512,7 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) | |||
512 | * | 512 | * |
513 | * Called on initialization, right before the PCM preparation | 513 | * Called on initialization, right before the PCM preparation |
514 | * Usually used in ALSA to allocate the DMA, but since we don't use the | 514 | * Usually used in ALSA to allocate the DMA, but since we don't use the |
515 | * ALSA DMA I'm almost sure this isn't necessary. | 515 | * ALSA DMA it does nothing |
516 | * | 516 | * |
517 | */ | 517 | */ |
518 | 518 | ||
@@ -520,7 +520,7 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, | |||
520 | snd_pcm_hw_params_t * hw_params) | 520 | snd_pcm_hw_params_t * hw_params) |
521 | { | 521 | { |
522 | 522 | ||
523 | return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); | 523 | return 0; |
524 | 524 | ||
525 | 525 | ||
526 | } | 526 | } |
@@ -538,7 +538,7 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, | |||
538 | 538 | ||
539 | static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) | 539 | static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) |
540 | { | 540 | { |
541 | return snd_pcm_lib_free_pages(substream); | 541 | return 0; |
542 | } | 542 | } |
543 | 543 | ||
544 | /* | 544 | /* |
@@ -670,9 +670,6 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) | |||
670 | pcm->private_data = saa7134; | 670 | pcm->private_data = saa7134; |
671 | pcm->info_flags = 0; | 671 | pcm->info_flags = 0; |
672 | strcpy(pcm->name, "SAA7134 PCM"); | 672 | strcpy(pcm->name, "SAA7134 PCM"); |
673 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | ||
674 | snd_dma_pci_data(saa7134->pci), | ||
675 | 128*1024, 256*1024); | ||
676 | return 0; | 673 | return 0; |
677 | } | 674 | } |
678 | 675 | ||
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 6413a6e09873..0c74c2f5edaa 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -617,8 +617,8 @@ static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
617 | 617 | ||
618 | for (start = 0; start<4; start++) { | 618 | for (start = 0; start<4; start++) { |
619 | if (b[start] == 0x80) { | 619 | if (b[start] == 0x80) { |
620 | code=b[(start+3)%4]; | 620 | code=b[(start+3)%4]; |
621 | parity=b[(start+2)%4]; | 621 | parity=b[(start+2)%4]; |
622 | } | 622 | } |
623 | } | 623 | } |
624 | 624 | ||