of/i2c: Generalize OF support
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / i2c / busses / i2c-ibm_iic.c
index bf34413..d964121 100644 (file)
@@ -745,6 +745,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
        /* Register it with i2c layer */
        adap = &dev->adap;
        adap->dev.parent = &ofdev->dev;
+       adap->dev.of_node = of_node_get(np);
        strlcpy(adap->name, "IBM IIC", sizeof(adap->name));
        i2c_set_adapdata(adap, dev);
        adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
@@ -761,7 +762,7 @@ static int __devinit iic_probe(struct of_device *ofdev,
                 dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
 
        /* Now register all the child nodes */
-       of_register_i2c_devices(adap, np);
+       of_i2c_register_devices(adap);
 
        return 0;