Commit a4dd3f22 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] applicom iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5aae9ea9
...@@ -89,7 +89,7 @@ MODULE_SUPPORTED_DEVICE("ac"); ...@@ -89,7 +89,7 @@ MODULE_SUPPORTED_DEVICE("ac");
static struct applicom_board { static struct applicom_board {
unsigned long PhysIO; unsigned long PhysIO;
unsigned long RamIO; void __iomem *RamIO;
wait_queue_head_t FlagSleepSend; wait_queue_head_t FlagSleepSend;
long irq; long irq;
spinlock_t mutex; spinlock_t mutex;
...@@ -127,7 +127,7 @@ static struct miscdevice ac_miscdev = { ...@@ -127,7 +127,7 @@ static struct miscdevice ac_miscdev = {
static int dummy; /* dev_id for request_irq() */ static int dummy; /* dev_id for request_irq() */
static int ac_register_board(unsigned long physloc, unsigned long loc, static int ac_register_board(unsigned long physloc, void __iomem *loc,
unsigned char boardno) unsigned char boardno)
{ {
volatile unsigned char byte_reset_it; volatile unsigned char byte_reset_it;
...@@ -179,11 +179,11 @@ void cleanup_module(void) ...@@ -179,11 +179,11 @@ void cleanup_module(void)
if (!apbs[i].RamIO) if (!apbs[i].RamIO)
continue; continue;
iounmap((void *) apbs[i].RamIO);
if (apbs[i].irq) if (apbs[i].irq)
free_irq(apbs[i].irq, &dummy); free_irq(apbs[i].irq, &dummy);
iounmap(apbs[i].RamIO);
} }
} }
...@@ -193,7 +193,7 @@ int __init applicom_init(void) ...@@ -193,7 +193,7 @@ int __init applicom_init(void)
{ {
int i, numisa = 0; int i, numisa = 0;
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
void *RamIO; void __iomem *RamIO;
int boardno; int boardno;
printk(KERN_INFO "Applicom driver: $Id: ac.c,v 1.30 2000/03/22 16:03:57 dwmw2 Exp $\n"); printk(KERN_INFO "Applicom driver: $Id: ac.c,v 1.30 2000/03/22 16:03:57 dwmw2 Exp $\n");
...@@ -223,8 +223,8 @@ int __init applicom_init(void) ...@@ -223,8 +223,8 @@ int __init applicom_init(void)
applicom_pci_devnames[dev->device-1], dev->resource[0].start, applicom_pci_devnames[dev->device-1], dev->resource[0].start,
dev->irq); dev->irq);
if (!(boardno = ac_register_board(dev->resource[0].start, boardno = ac_register_board(dev->resource[0].start, RamIO,0);
(unsigned long)RamIO,0))) { if (!boardno) {
printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n"); printk(KERN_INFO "ac.o: PCI Applicom device doesn't have correct signature.\n");
iounmap(RamIO); iounmap(RamIO);
pci_disable_device(dev); pci_disable_device(dev);
...@@ -235,7 +235,7 @@ int __init applicom_init(void) ...@@ -235,7 +235,7 @@ int __init applicom_init(void)
printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq); printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq);
iounmap(RamIO); iounmap(RamIO);
pci_disable_device(dev); pci_disable_device(dev);
apbs[boardno - 1].RamIO = 0; apbs[boardno - 1].RamIO = NULL;
continue; continue;
} }
...@@ -270,7 +270,7 @@ int __init applicom_init(void) ...@@ -270,7 +270,7 @@ int __init applicom_init(void)
} }
if (!(boardno = ac_register_board((unsigned long)mem+ (LEN_RAM_IO*i), if (!(boardno = ac_register_board((unsigned long)mem+ (LEN_RAM_IO*i),
(unsigned long)RamIO,i+1))) { RamIO,i+1))) {
iounmap(RamIO); iounmap(RamIO);
continue; continue;
} }
...@@ -280,8 +280,8 @@ int __init applicom_init(void) ...@@ -280,8 +280,8 @@ int __init applicom_init(void)
if (!numisa) { if (!numisa) {
if (request_irq(irq, &ac_interrupt, SA_SHIRQ, "Applicom ISA", &dummy)) { if (request_irq(irq, &ac_interrupt, SA_SHIRQ, "Applicom ISA", &dummy)) {
printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq); printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq);
iounmap((void *) RamIO); iounmap(RamIO);
apbs[boardno - 1].RamIO = 0; apbs[boardno - 1].RamIO = NULL;
} }
else else
apbs[boardno - 1].irq = irq; apbs[boardno - 1].irq = irq;
...@@ -449,7 +449,7 @@ static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, ...@@ -449,7 +449,7 @@ static ssize_t ac_write(struct file *file, const char __user *buf, size_t count,
because it works with 2.2 still */ because it works with 2.2 still */
{ {
unsigned char *from = (unsigned char *) &tmpmailbox; unsigned char *from = (unsigned char *) &tmpmailbox;
unsigned long to = (unsigned long) apbs[IndexCard].RamIO + RAM_FROM_PC; void __iomem *to = apbs[IndexCard].RamIO + RAM_FROM_PC;
int c; int c;
for (c = 0; c < sizeof(struct mailbox); c++) for (c = 0; c < sizeof(struct mailbox); c++)
...@@ -470,7 +470,7 @@ static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, ...@@ -470,7 +470,7 @@ static ssize_t ac_write(struct file *file, const char __user *buf, size_t count,
static int do_ac_read(int IndexCard, char __user *buf, static int do_ac_read(int IndexCard, char __user *buf,
struct st_ram_io *st_loc, struct mailbox *mailbox) struct st_ram_io *st_loc, struct mailbox *mailbox)
{ {
unsigned long from = (unsigned long)apbs[IndexCard].RamIO + RAM_TO_PC; void __iomem *from = apbs[IndexCard].RamIO + RAM_TO_PC;
unsigned char *to = (unsigned char *)&mailbox; unsigned char *to = (unsigned char *)&mailbox;
#ifdef DEBUG #ifdef DEBUG
int c; int c;
...@@ -685,7 +685,7 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un ...@@ -685,7 +685,7 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
{ /* @ ADG ou ATO selon le cas */ { /* @ ADG ou ATO selon le cas */
int i; int i;
unsigned char IndexCard; unsigned char IndexCard;
unsigned long pmem; void __iomem *pmem;
int ret = 0; int ret = 0;
volatile unsigned char byte_reset_it; volatile unsigned char byte_reset_it;
struct st_ram_io *adgl; struct st_ram_io *adgl;
......
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