Commit 7c929c33 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] __iomem fixups for atiixp soundcards

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba8030ac
......@@ -258,7 +258,7 @@ struct snd_atiixp {
struct pci_dev *pci;
unsigned long addr;
unsigned long remap_addr;
void __iomem *remap_addr;
int irq;
ac97_bus_t *ac97_bus;
......@@ -303,7 +303,7 @@ MODULE_DEVICE_TABLE(pci, snd_atiixp_ids);
static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
unsigned int mask, unsigned int value)
{
unsigned long addr = chip->remap_addr + reg;
void __iomem *addr = chip->remap_addr + reg;
unsigned int data, old_data;
old_data = data = readl(addr);
data &= ~mask;
......@@ -1472,7 +1472,7 @@ static int snd_atiixp_free(atiixp_t *chip)
if (chip->irq >= 0)
free_irq(chip->irq, (void *)chip);
if (chip->remap_addr)
iounmap((void *) chip->remap_addr);
iounmap(chip->remap_addr);
pci_release_regions(chip->pci);
kfree(chip);
return 0;
......@@ -1515,7 +1515,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
return err;
}
chip->addr = pci_resource_start(pci, 0);
chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
if (chip->remap_addr == 0) {
snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
snd_atiixp_free(chip);
......
......@@ -241,7 +241,7 @@ struct snd_atiixp {
struct resource *res; /* memory i/o */
unsigned long addr;
unsigned long remap_addr;
void __iomem *remap_addr;
int irq;
ac97_bus_t *ac97_bus;
......@@ -284,7 +284,7 @@ MODULE_DEVICE_TABLE(pci, snd_atiixp_ids);
static int snd_atiixp_update_bits(atiixp_t *chip, unsigned int reg,
unsigned int mask, unsigned int value)
{
unsigned long addr = chip->remap_addr + reg;
void __iomem *addr = chip->remap_addr + reg;
unsigned int data, old_data;
old_data = data = readl(addr);
data &= ~mask;
......@@ -1194,7 +1194,7 @@ static int snd_atiixp_free(atiixp_t *chip)
if (chip->irq >= 0)
free_irq(chip->irq, (void *)chip);
if (chip->remap_addr)
iounmap((void *) chip->remap_addr);
iounmap(chip->remap_addr);
pci_release_regions(chip->pci);
kfree(chip);
return 0;
......@@ -1237,7 +1237,7 @@ static int __devinit snd_atiixp_create(snd_card_t *card,
return err;
}
chip->addr = pci_resource_start(pci, 0);
chip->remap_addr = (unsigned long) ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
chip->remap_addr = ioremap_nocache(chip->addr, pci_resource_len(pci, 0));
if (chip->remap_addr == 0) {
snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
snd_atiixp_free(chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment