diff options
author | Tom Rini <trini@konsulko.com> | 2016-07-27 22:30:20 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-27 22:30:20 -0400 |
commit | fe34b6a4845476208ca7d19a35179e56bebf3877 (patch) | |
tree | 05643ac1448012bbb7514dd04526168737c86b58 /drivers/i2c/i2c-uclass.c | |
parent | c6f086ddcbfb47918b82f6a135c61f432540da42 (diff) | |
parent | 02ebd42cf19e523593d8e4e8f3d02083299fcdbb (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/i2c/i2c-uclass.c')
-rw-r--r-- | drivers/i2c/i2c-uclass.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index 20b30ffbeb5..dbd3789747d 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -12,7 +12,6 @@ #include <malloc.h> #include <dm/device-internal.h> #include <dm/lists.h> -#include <dm/root.h> DECLARE_GLOBAL_DATA_PTR; @@ -499,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_node(dev, gd->fdt_blob, dev->of_offset, false); -#else - return 0; -#endif -} - static int i2c_child_post_bind(struct udevice *dev) { #if CONFIG_IS_ENABLED(OF_CONTROL) @@ -527,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), |