diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2006-10-09 08:13:32 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@server.perex.cz> | 2006-12-20 08:55:36 +0100 |
commit | 7ab399262ee636d19db5163a35ac406d5b892a0a (patch) | |
tree | 6cfe6267feb4a8d56114e282d41b683946c6eaf0 /sound/pci/trident | |
parent | e7d24f0bbd0eb0d9a6d337ef67d5e2ad78900488 (diff) | |
download | blackbird-op-linux-7ab399262ee636d19db5163a35ac406d5b892a0a.tar.gz blackbird-op-linux-7ab399262ee636d19db5163a35ac406d5b892a0a.zip |
[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.c | 4 |
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) snd_printk(KERN_ERR "trident: unable to allocate TLB buffer\n"); return -ENOMEM; } - trident->tlb.entries = (unsigned int*)(((unsigned long)trident->tlb.buffer.area + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1)); - trident->tlb.entries_dmaaddr = (trident->tlb.buffer.addr + SNDRV_TRIDENT_MAX_PAGES * 4 - 1) & ~(SNDRV_TRIDENT_MAX_PAGES * 4 - 1); + trident->tlb.entries = (unsigned int*)ALIGN((unsigned long)trident->tlb.buffer.area, SNDRV_TRIDENT_MAX_PAGES * 4); + trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4); /* allocate shadow TLB page table (virtual addresses) */ trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long)); if (trident->tlb.shadow_entries == NULL) { |