Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58821
b: refs/heads/master
c: 066af98
h: refs/heads/master
i:
  58819: a8eef5a
v: v3
  • Loading branch information
Rodolfo Giometti authored and Jean Delvare committed Jul 12, 2007
1 parent 655061d commit aaf0c64
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: 4d6ceed4426cd85e1203a3153246334a3537f92b
refs/heads/master: 066af983c74162fa98e7c5ffa8a5ead4a6979b1f
9 changes: 8 additions & 1 deletion trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,14 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.class = plat->class;
}

ret = i2c_add_adapter(&i2c->adap);
/*
* If "dev->id" 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.
*/
i2c->adap.nr = dev->id >= 0 ? dev->id : 0;

ret = i2c_add_numbered_adapter(&i2c->adap);
if (ret < 0) {
printk(KERN_INFO "I2C: Failed to add bus\n");
goto eadapt;
Expand Down

0 comments on commit aaf0c64

Please sign in to comment.