Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137153
b: refs/heads/master
c: 2514cca
h: refs/heads/master
i:
  137151: 97438c0
v: v3
  • Loading branch information
Catalin Marinas authored and Russell King committed Feb 19, 2009
1 parent 8e18e90 commit 5d913cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: eab184c2362567f2b2e951b7bd0e0d353a7e5091
refs/heads/master: 2514cca06be9dc7ae12908085ebaf0ef49e6d8ae
10 changes: 8 additions & 2 deletions trunk/drivers/i2c/busses/i2c-versatile.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ static int i2c_versatile_probe(struct platform_device *dev)
i2c->algo = i2c_versatile_algo;
i2c->algo.data = i2c;

ret = i2c_bit_add_bus(&i2c->adap);
if (dev->id >= 0) {
/* static bus numbering */
i2c->adap.nr = dev->id;
ret = i2c_bit_add_numbered_bus(&i2c->adap);
} else
/* dynamic bus numbering */
ret = i2c_bit_add_bus(&i2c->adap);
if (ret >= 0) {
platform_set_drvdata(dev, i2c);
return 0;
Expand Down Expand Up @@ -146,7 +152,7 @@ static void __exit i2c_versatile_exit(void)
platform_driver_unregister(&i2c_versatile_driver);
}

module_init(i2c_versatile_init);
subsys_initcall(i2c_versatile_init);
module_exit(i2c_versatile_exit);

MODULE_DESCRIPTION("ARM Versatile I2C bus driver");
Expand Down

0 comments on commit 5d913cb

Please sign in to comment.