aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-21 13:00:13 +0200
committerJaroslav Kysela <perex@perex.cz>2008-08-25 09:57:18 +0200
commit77a23f2695bb2de0cd74599400dc55109c531b72 (patch)
tree4960195e04016928dea83deb85e0f3bf97024a8a /sound/pci/via82xx.c
parent46480b3a5f88f20dbf25d95fe74d7b4798d5bc86 (diff)
downloadkernel_samsung_smdk4412-77a23f2695bb2de0cd74599400dc55109c531b72.zip
kernel_samsung_smdk4412-77a23f2695bb2de0cd74599400dc55109c531b72.tar.gz
kernel_samsung_smdk4412-77a23f2695bb2de0cd74599400dc55109c531b72.tar.bz2
ALSA: Clean up SG-buffer helper functions and macros
Clean up SG-buffer helper functions and macros. Helpers take substream as arguments now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 84ea35d..8766848 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -420,7 +420,6 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
{
unsigned int i, idx, ofs, rest;
struct via82xx *chip = snd_pcm_substream_chip(substream);
- struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
if (dev->table.area == NULL) {
/* the start of each lists must be aligned to 8 bytes,
@@ -449,12 +448,14 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
do {
unsigned int r;
unsigned int flag;
+ unsigned int addr;
if (idx >= VIA_TABLE_SIZE) {
snd_printk(KERN_ERR "via82xx: too much table size!\n");
return -EINVAL;
}
- ((u32 *)dev->table.area)[idx << 1] = cpu_to_le32((u32)snd_pcm_sgbuf_get_addr(sgbuf, ofs));
+ addr = snd_pcm_sgbuf_get_addr(substream, ofs);
+ ((u32 *)dev->table.area)[idx << 1] = cpu_to_le32(addr);
r = PAGE_SIZE - (ofs % PAGE_SIZE);
if (rest < r)
r = rest;