summaryrefslogtreecommitdiff
path: root/linux/sound
diff options
context:
space:
mode:
Diffstat (limited to 'linux/sound')
-rw-r--r--linux/sound/pci/bt87x.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c
index 6c70b246d..8b6868462 100644
--- a/linux/sound/pci/bt87x.c
+++ b/linux/sound/pci/bt87x.c
@@ -244,6 +244,9 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
{
unsigned int i, offset;
u32 *risc;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+ struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
+#endif
if (chip->dma_risc.area == NULL) {
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
@@ -275,7 +278,11 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
if (len == rest)
cmd |= RISC_EOL | RISC_IRQ;
*risc++ = cpu_to_le32(cmd);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+ addr = snd_pcm_sgbuf_get_addr(sgbuf, offset);
+#else
addr = snd_pcm_sgbuf_get_addr(substream, offset);
+#endif
*risc++ = cpu_to_le32(addr);
offset += len;
rest -= len;
@@ -768,8 +775,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
pci_disable_device(pci);
return err;
}
- chip->mmio = ioremap_nocache(pci_resource_start(pci, 0),
- pci_resource_len(pci, 0));
+ chip->mmio = pci_ioremap_bar(pci, 0);
if (!chip->mmio) {
snd_printk(KERN_ERR "cannot remap io memory\n");
err = -ENOMEM;