diff options
author | Kevin Hilman <khilman@deeprootsystems.com> | 2009-01-30 14:59:27 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 07:46:23 -0400 |
commit | 13b8860d102de3daa4a4bf23542495b507edd7e9 (patch) | |
tree | 5767b63cace04f5b2f9533d00d644cdad1fb8117 /drivers/ide/palm_bk3710.c | |
parent | f94116aeec7a299640dd692128e1d22178affa8d (diff) |
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/palm_bk3710.c')
-rw-r--r-- | drivers/ide/palm_bk3710.c | 13 |
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) | |||
347 | struct clk *clk; | 347 | struct clk *clk; |
348 | struct resource *mem, *irq; | 348 | struct resource *mem, *irq; |
349 | void __iomem *base; | 349 | void __iomem *base; |
350 | unsigned long rate; | 350 | unsigned long rate, mem_size; |
351 | int i, rc; | 351 | int i, rc; |
352 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; | 352 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; |
353 | 353 | ||
@@ -374,13 +374,18 @@ static int __init palm_bk3710_probe(struct platform_device *pdev) | |||
374 | return -ENODEV; | 374 | return -ENODEV; |
375 | } | 375 | } |
376 | 376 | ||
377 | if (request_mem_region(mem->start, mem->end - mem->start + 1, | 377 | mem_size = mem->end - mem->start + 1; |
378 | "palm_bk3710") == NULL) { | 378 | if (request_mem_region(mem->start, mem_size, "palm_bk3710") == NULL) { |
379 | printk(KERN_ERR "failed to request memory region\n"); | 379 | printk(KERN_ERR "failed to request memory region\n"); |
380 | return -EBUSY; | 380 | return -EBUSY; |
381 | } | 381 | } |
382 | 382 | ||
383 | base = IO_ADDRESS(mem->start); | 383 | base = ioremap(mem->start, mem_size); |
384 | if (!base) { | ||
385 | printk(KERN_ERR "failed to map IO memory\n"); | ||
386 | release_mem_region(mem->start, mem_size); | ||
387 | return -ENOMEM; | ||
388 | } | ||
384 | 389 | ||
385 | /* Configure the Palm Chip controller */ | 390 | /* Configure the Palm Chip controller */ |
386 | palm_bk3710_chipinit(base); | 391 | palm_bk3710_chipinit(base); |