Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68586
b: refs/heads/master
c: 7589a32
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Roese authored and Jean Delvare committed Oct 13, 2007
1 parent ee82148 commit 84a90ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 8056c6cb2bb1632aa9221dce0e43a61db37b420f
refs/heads/master: 7589a326d1d8c9da575ca4cbc6a3e6af02b57ead
9 changes: 8 additions & 1 deletion trunk/drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,14 @@ static int __devinit iic_probe(struct ocp_device *ocp){
adap->timeout = 1;
adap->retries = 1;

if ((ret = i2c_add_adapter(adap)) != 0){
/*
* If "dev->idx" is negative we consider it as zero.
* The reason to do so is to avoid sysfs names that only make
* sense when there are multiple adapters.
*/
adap->nr = dev->idx >= 0 ? dev->idx : 0;

if ((ret = i2c_add_numbered_adapter(adap)) < 0) {
printk(KERN_CRIT "ibm-iic%d: failed to register i2c adapter\n",
dev->idx);
goto fail;
Expand Down

0 comments on commit 84a90ea

Please sign in to comment.