Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37721
b: refs/heads/master
c: f12ad7d
h: refs/heads/master
i:
  37719: 8a249c4
v: v3
  • Loading branch information
Amol Lad authored and Linus Torvalds committed Oct 1, 2006
1 parent 274a8f5 commit 18c441e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16c564bb3cdecbc39eab5c0de3fe94ed58ba4163
refs/heads/master: f12ad7d59ab77591e4ab2dacd6faa9ea9afffb99
9 changes: 5 additions & 4 deletions trunk/drivers/serial/8250_acorn.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct serial_card_type {
struct serial_card_info {
unsigned int num_ports;
int ports[MAX_PORTS];
void __iomem *vaddr;
};

static int __devinit
Expand All @@ -44,7 +45,6 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id)
struct serial_card_type *type = id->data;
struct uart_port port;
unsigned long bus_addr;
unsigned char __iomem *virt_addr;
unsigned int i;

info = kmalloc(sizeof(struct serial_card_info), GFP_KERNEL);
Expand All @@ -55,8 +55,8 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id)
info->num_ports = type->num_ports;

bus_addr = ecard_resource_start(ec, type->type);
virt_addr = ioremap(bus_addr, ecard_resource_len(ec, type->type));
if (!virt_addr) {
info->vaddr = ioremap(bus_addr, ecard_resource_len(ec, type->type));
if (!info->vaddr) {
kfree(info);
return -ENOMEM;
}
Expand All @@ -72,7 +72,7 @@ serial_card_probe(struct expansion_card *ec, const struct ecard_id *id)
port.dev = &ec->dev;

for (i = 0; i < info->num_ports; i ++) {
port.membase = virt_addr + type->offset[i];
port.membase = info->vaddr + type->offset[i];
port.mapbase = bus_addr + type->offset[i];

info->ports[i] = serial8250_register_port(&port);
Expand All @@ -92,6 +92,7 @@ static void __devexit serial_card_remove(struct expansion_card *ec)
if (info->ports[i] > 0)
serial8250_unregister_port(info->ports[i]);

iounmap(info->vaddr);
kfree(info);
}

Expand Down

0 comments on commit 18c441e

Please sign in to comment.