Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137632
b: refs/heads/master
c: 13b8860
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hilman authored and Bartlomiej Zolnierkiewicz committed Mar 27, 2009
1 parent 633dfa8 commit ac1fafc
Show file tree
Hide file tree
Showing 2 changed files with 10 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: f94116aeec7a299640dd692128e1d22178affa8d
refs/heads/master: 13b8860d102de3daa4a4bf23542495b507edd7e9
13 changes: 9 additions & 4 deletions trunk/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 ac1fafc

Please sign in to comment.