summaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-01-30 11:59:27 -0800
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:23 +0100
commit13b8860d102de3daa4a4bf23542495b507edd7e9 (patch)
tree5767b63cace04f5b2f9533d00d644cdad1fb8117 /drivers/ide
parentf94116aeec7a299640dd692128e1d22178affa8d (diff)
downloadblackbird-op-linux-13b8860d102de3daa4a4bf23542495b507edd7e9.tar.gz
blackbird-op-linux-13b8860d102de3daa4a4bf23542495b507edd7e9.zip
IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> [bart: minor CodingStyle fixup per Sergei's suggestion] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/palm_bk3710.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
index f38aac78044c..c7acca0b8733 100644
--- a/drivers/ide/palm_bk3710.c
+++ b/drivers/ide/palm_bk3710.c
@@ -347,7 +347,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 };
@@ -374,13 +374,18 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
return -ENODEV;
}
- if (request_mem_region(mem->start, mem->end - mem->start + 1,
- "palm_bk3710") == NULL) {
+ 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);
OpenPOWER on IntegriCloud