From 911954859d6dece49c3e4835faea004cfe392506 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 5 Jul 2016 17:10:10 -0600 Subject: dm: Use dm_scan_fdt_dev() directly where possible Quite a few places have a bind() method which just calls dm_scan_fdt_dev(). We may as well call dm_scan_fdt_dev() directly. Update the code to do this. Signed-off-by: Simon Glass --- drivers/spi/spi-uclass.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/spi/spi-uclass.c') diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index 3d3005c..247abfa 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -108,12 +108,6 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, return dm_spi_xfer(slave->dev, bitlen, dout, din, flags); } -static int spi_post_bind(struct udevice *dev) -{ - /* Scan the bus for devices */ - return dm_scan_fdt_dev(dev); -} - static int spi_child_post_bind(struct udevice *dev) { struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); @@ -445,7 +439,7 @@ UCLASS_DRIVER(spi) = { .id = UCLASS_SPI, .name = "spi", .flags = DM_UC_FLAG_SEQ_ALIAS, - .post_bind = spi_post_bind, + .post_bind = dm_scan_fdt_dev, .post_probe = spi_post_probe, .child_pre_probe = spi_child_pre_probe, .per_device_auto_alloc_size = sizeof(struct dm_spi_bus), -- cgit v1.1