Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198027
b: refs/heads/master
c: d12d42f
h: refs/heads/master
i:
  198025: 63b6b22
  198023: 1716a8e
v: v3
  • Loading branch information
Grant Likely committed Apr 29, 2010
1 parent c29fded commit af8205b
Show file tree
Hide file tree
Showing 4 changed files with 9 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: d706c1b050274b3bf97d7cb0542c0d070c9ccb8b
refs/heads/master: d12d42f744f805a9ccc33cd76f04b237cd83ce56
3 changes: 3 additions & 0 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
client->dev.parent = &client->adapter->dev;
client->dev.bus = &i2c_bus_type;
client->dev.type = &i2c_client_type;
#ifdef CONFIG_OF
client->dev.of_node = info->of_node;
#endif

dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap),
client->addr);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/of/of_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
info.addr = be32_to_cpup(addr);

dev_archdata_set_node(&dev_ad, node);
info.of_node = node;
info.archdata = &dev_ad;

request_module("%s", info.type);
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/device.h> /* for struct device */
#include <linux/sched.h> /* for completion */
#include <linux/mutex.h>
#include <linux/of.h> /* for struct device_node */

extern struct bus_type i2c_bus_type;

Expand Down Expand Up @@ -251,6 +252,9 @@ struct i2c_board_info {
unsigned short addr;
void *platform_data;
struct dev_archdata *archdata;
#ifdef CONFIG_OF
struct device_node *of_node;
#endif
int irq;
};

Expand Down

0 comments on commit af8205b

Please sign in to comment.