git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
V4L/DVB (9016): HVR3000/4000 Hauppauge related IR cleanups
[safe/jmp/linux-2.6]
/
sound
/
pci
/
via82xx_modem.c
diff --git
a/sound/pci/via82xx_modem.c
b/sound/pci/via82xx_modem.c
index
31f64ee
..
5bd79d2
100644
(file)
--- a/
sound/pci/via82xx_modem.c
+++ b/
sound/pci/via82xx_modem.c
@@
-281,7
+281,6
@@
static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
{
unsigned int i, idx, ofs, rest;
struct via82xx_modem *chip = snd_pcm_substream_chip(substream);
{
unsigned int i, idx, ofs, rest;
struct via82xx_modem *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,
if (dev->table.area == NULL) {
/* the start of each lists must be aligned to 8 bytes,
@@
-310,12
+309,14
@@
static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
do {
unsigned int r;
unsigned int flag;
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;
}
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;
r = PAGE_SIZE - (ofs % PAGE_SIZE);
if (rest < r)
r = rest;
@@
-612,7
+613,8
@@
static snd_pcm_uframes_t snd_via686_pcm_pointer(struct snd_pcm_substream *substr
struct viadev *viadev = substream->runtime->private_data;
unsigned int idx, ptr, count, res;
struct viadev *viadev = substream->runtime->private_data;
unsigned int idx, ptr, count, res;
- snd_assert(viadev->tbl_entries, return 0);
+ if (snd_BUG_ON(!viadev->tbl_entries))
+ return 0;
if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE))
return 0;
if (!(inb(VIADEV_REG(viadev, OFFSET_STATUS)) & VIA_REG_STAT_ACTIVE))
return 0;