Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44338
b: refs/heads/master
c: 31c095b
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Baptiste Maneyrol authored and Jean Delvare committed Dec 10, 2006
1 parent b7c28e3 commit ccc8f53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 41561f28e76a47dc6de0a954da85d0b5c42874eb
refs/heads/master: 31c095b09ea2fe6a4c752fccaabd9025e1c6e7c7
9 changes: 9 additions & 0 deletions trunk/drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,12 @@ static int __devinit iic_probe(struct ocp_device *ocp){
dev->idx = ocp->def->index;
ocp_set_drvdata(ocp, dev);

if (!request_mem_region(ocp->def->paddr, sizeof(struct iic_regs),
"ibm_iic")) {
ret = -EBUSY;
goto fail1;
}

if (!(dev->vaddr = ioremap(ocp->def->paddr, sizeof(struct iic_regs)))){
printk(KERN_CRIT "ibm-iic%d: failed to ioremap device registers\n",
dev->idx);
Expand Down Expand Up @@ -750,6 +756,8 @@ static int __devinit iic_probe(struct ocp_device *ocp){

iounmap(dev->vaddr);
fail2:
release_mem_region(ocp->def->paddr, sizeof(struct iic_regs));
fail1:
ocp_set_drvdata(ocp, NULL);
kfree(dev);
return ret;
Expand Down Expand Up @@ -777,6 +785,7 @@ static void __devexit iic_remove(struct ocp_device *ocp)
free_irq(dev->irq, dev);
}
iounmap(dev->vaddr);
release_mem_region(ocp->def->paddr, sizeof(struct iic_regs));
kfree(dev);
}
}
Expand Down

0 comments on commit ccc8f53

Please sign in to comment.