aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/trident
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2006-10-09 02:13:32 -0400
committerJaroslav Kysela <perex@server.perex.cz>2006-12-20 02:55:36 -0500
commit7ab399262ee636d19db5163a35ac406d5b892a0a (patch)
tree6cfe6267feb4a8d56114e282d41b683946c6eaf0 /sound/pci/trident
parente7d24f0bbd0eb0d9a6d337ef67d5e2ad78900488 (diff)
[ALSA] use the ALIGN macro
Use the ALIGN macro instead of manual calculations. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/trident')
-rw-r--r--sound/pci/trident/trident_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index 1fbc4321122f..89fe5760df36 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -3380,8 +3380,8 @@ static int __devinit snd_trident_tlb_alloc(struct snd_trident *trident)
3380 snd_printk(KERN_ERR "trident: unable to allocate TLB buffer\n"); 3380 snd_printk(KERN_ERR "trident: unable to allocate TLB buffer\n");
3381 return -ENOMEM; 3381 return -ENOMEM;
3382 } 3382 }
3383 trident->tlb.entries = (unsigned int*)(((unsigned long)trident->tlb.buffer.area + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1)); 3383 trident->tlb.entries = (unsigned int*)ALIGN((unsigned long)trident->tlb.buffer.area, SNDRV_TRIDENT_MAX_PAGES * 4);
3384 trident->tlb.entries_dmaaddr = (trident->tlb.buffer.addr + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1); 3384 trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4);
3385 /* allocate shadow TLB page table (virtual addresses) */ 3385 /* allocate shadow TLB page table (virtual addresses) */
3386 trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long)); 3386 trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long));
3387 if (trident->tlb.shadow_entries == NULL) { 3387 if (trident->tlb.shadow_entries == NULL) {