Skip to content

Commit

Permalink
IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Hilman authored and Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent f94116a commit 13b8860
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions drivers/ide/palm_bk3710.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand All @@ -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);
Expand Down

0 comments on commit 13b8860

Please sign in to comment.