Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58819
b: refs/heads/master
c: 7e69c3a
h: refs/heads/master
i:
  58817: 6effeec
  58815: 9db888c
v: v3
  • Loading branch information
Atsushi Nemoto authored and Jean Delvare committed Jul 12, 2007
1 parent e8281dc commit a8eef5a
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 757ba4c697244da878b65585d8cb671da1cb9eaf
refs/heads/master: 7e69c3ac93a9a7aa29dab7179f86da67db7b0ca3
8 changes: 7 additions & 1 deletion trunk/drivers/i2c/busses/i2c-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ static int __init i2c_gpio_probe(struct platform_device *pdev)
adap->algo_data = bit_data;
adap->dev.parent = &pdev->dev;

ret = i2c_bit_add_bus(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.
*/
adap->nr = pdev->id >= 0 ? pdev->id : 0;
ret = i2c_bit_add_numbered_bus(adap);
if (ret)
goto err_add_bus;

Expand Down

0 comments on commit a8eef5a

Please sign in to comment.