aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ibm_iic.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-06-08 09:48:18 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-07-05 18:14:52 -0400
commit9fd049927ccba1c1d0343239b82f28c4e07fb95d (patch)
treee7d86e42e2643e1376c102f00c0e76d14cf65f86 /drivers/i2c/busses/i2c-ibm_iic.c
parent4f0ddcb020ef8afae65b4edb9aeb4a42ab74f4cf (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-ibm_iic.c')
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index bf344135647a..d9641210dd3a 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -745,6 +745,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
745 /* Register it with i2c layer */ 745 /* Register it with i2c layer */
746 adap = &dev->adap; 746 adap = &dev->adap;
747 adap->dev.parent = &ofdev->dev; 747 adap->dev.parent = &ofdev->dev;
748 adap->dev.of_node = of_node_get(np);
748 strlcpy(adap->name, "IBM IIC", sizeof(adap->name)); 749 strlcpy(adap->name, "IBM IIC", sizeof(adap->name));
749 i2c_set_adapdata(adap, dev); 750 i2c_set_adapdata(adap, dev);
750 adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; 751 adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
@@ -761,7 +762,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
761 dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)"); 762 dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
762 763
763 /* Now register all the child nodes */ 764 /* Now register all the child nodes */
764 of_register_i2c_devices(adap, np); 765 of_i2c_register_devices(adap);
765 766
766 return 0; 767 return 0;
767 768