diff options
author | Simon Glass <sjg@chromium.org> | 2016-07-05 17:10:10 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-07-27 14:15:54 -0600 |
commit | 911954859d6dece49c3e4835faea004cfe392506 (patch) | |
tree | 79431b5419e1366009f331a3d1a604b64f14ccff /drivers/pci/pci_sandbox.c | |
parent | 2e3f1ff63f50f36e74d46f939823241856ebf1bd (diff) |
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 <sjg@chromium.org>
Diffstat (limited to 'drivers/pci/pci_sandbox.c')
-rw-r--r-- | drivers/pci/pci_sandbox.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c index b5628139b3..6a84ee386d 100644 --- a/drivers/pci/pci_sandbox.c +++ b/drivers/pci/pci_sandbox.c @@ -51,12 +51,6 @@ static int sandbox_pci_read_config(struct udevice *bus, pci_dev_t devfn, return ops->read_config(emul, offset, valuep, size); } -static int sandbox_pci_child_post_bind(struct udevice *dev) -{ - /* Attach an emulator if we can */ - return dm_scan_fdt_dev(dev); -} - static const struct dm_pci_ops sandbox_pci_ops = { .read_config = sandbox_pci_read_config, .write_config = sandbox_pci_write_config, @@ -72,7 +66,9 @@ U_BOOT_DRIVER(pci_sandbox) = { .id = UCLASS_PCI, .of_match = sandbox_pci_ids, .ops = &sandbox_pci_ops, - .child_post_bind = sandbox_pci_child_post_bind, + + /* Attach an emulator if we can */ + .child_post_bind = dm_scan_fdt_dev, .per_child_platdata_auto_alloc_size = sizeof(struct pci_child_platdata), }; |