]> git.sur5r.net Git - u-boot/blobdiff - drivers/i2c/i2c-uclass.c
Merge branch 'master' of git://git.denx.de/u-boot-usb
[u-boot] / drivers / i2c / i2c-uclass.c
index 16447b896b0347f886b17fad75729296b08d6c57..dbd3789747dfdacc1ca2fc013203ff8d4f416e05 100644 (file)
@@ -498,16 +498,6 @@ static int i2c_post_probe(struct udevice *dev)
 #endif
 }
 
-static int i2c_post_bind(struct udevice *dev)
-{
-#if CONFIG_IS_ENABLED(OF_CONTROL)
-       /* Scan the bus for devices */
-        return dm_scan_fdt_dev(dev);
-#else
-       return 0;
-#endif
-}
-
 static int i2c_child_post_bind(struct udevice *dev)
 {
 #if CONFIG_IS_ENABLED(OF_CONTROL)
@@ -526,7 +516,9 @@ UCLASS_DRIVER(i2c) = {
        .id             = UCLASS_I2C,
        .name           = "i2c",
        .flags          = DM_UC_FLAG_SEQ_ALIAS,
-       .post_bind      = i2c_post_bind,
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+       .post_bind      = dm_scan_fdt_dev,
+#endif
        .post_probe     = i2c_post_probe,
        .per_device_auto_alloc_size = sizeof(struct dm_i2c_bus),
        .per_child_platdata_auto_alloc_size = sizeof(struct dm_i2c_chip),