diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-08 09:48:18 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:52 -0400 |
commit | 9fd049927ccba1c1d0343239b82f28c4e07fb95d (patch) | |
tree | e7d86e42e2643e1376c102f00c0e76d14cf65f86 /drivers/i2c/busses/i2c-mpc.c | |
parent | 4f0ddcb020ef8afae65b4edb9aeb4a42ab74f4cf (diff) |
of/i2c: Generalize OF support
This patch cleans up the i2c OF support code to make it selectable by
all architectures and allow for automatic registration of i2c devices.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/i2c/busses/i2c-mpc.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index df00eb1f11f9..d2e26d290e7a 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
@@ -600,13 +600,14 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
600 | i2c->adap = mpc_ops; | 600 | i2c->adap = mpc_ops; |
601 | i2c_set_adapdata(&i2c->adap, i2c); | 601 | i2c_set_adapdata(&i2c->adap, i2c); |
602 | i2c->adap.dev.parent = &op->dev; | 602 | i2c->adap.dev.parent = &op->dev; |
603 | i2c->adap.dev.of_node = of_node_get(op->dev.of_node); | ||
603 | 604 | ||
604 | result = i2c_add_adapter(&i2c->adap); | 605 | result = i2c_add_adapter(&i2c->adap); |
605 | if (result < 0) { | 606 | if (result < 0) { |
606 | dev_err(i2c->dev, "failed to add adapter\n"); | 607 | dev_err(i2c->dev, "failed to add adapter\n"); |
607 | goto fail_add; | 608 | goto fail_add; |
608 | } | 609 | } |
609 | of_register_i2c_devices(&i2c->adap, op->dev.of_node); | 610 | of_i2c_register_devices(&i2c->adap); |
610 | 611 | ||
611 | return result; | 612 | return result; |
612 | 613 | ||