Commit 83824d0a authored by Kevin Hilman's avatar Kevin Hilman

IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 6fc285cf
......@@ -348,7 +348,7 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
struct clk *clk;
struct resource *mem, *irq;
void __iomem *base;
unsigned long rate;
unsigned long rate, mem_size;
int i, rc;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
......@@ -375,13 +375,19 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
return -ENODEV;
}
if (request_mem_region(mem->start, mem->end - mem->start + 1,
mem_size = mem->end - mem->start + 1;
if (request_mem_region(mem->start, mem_size,
"palm_bk3710") == NULL) {
printk(KERN_ERR "failed to request memory region\n");
return -EBUSY;
}
base = IO_ADDRESS(mem->start);
base = ioremap(mem->start, mem_size);
if (!base) {
printk(KERN_ERR "failed to map IO memory\n");
release_mem_region(mem->start, mem_size);
return -ENOMEM;
}
/* Configure the Palm Chip controller */
palm_bk3710_chipinit(base);
......
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