]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: core: Mark device as active before calling its probe() method
authorSimon Glass <sjg@chromium.org>
Thu, 5 Mar 2015 19:25:21 +0000 (12:25 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:22 +0000 (21:47 +0200)
commit12045b881222eec753273d215f627bc39e590535
tree31282383397672554a821d97e6156afac4cc2de0
parent8bbb187ba2b565121d1e651dff1842411d1a0027
dm: core: Mark device as active before calling its probe() method

At present the device is not active when the probe() method is called. But
some probe() methods want to set up the device and this can involve
accessing it through normal methods. For example a PCI bus may wish to
set up its PCI parameters using calls to pci_hose_write_config_dword() and
similar.

At present this does not work because every such call within the probe()
method sees that the device is not active and attempts to probe it.

Already we mark the device as probed before calling the uclass post_probe()
method. This is a subtle change but I believe the new approach is better.
Since the scope of the change is only the probe() method and all its callees
it should still be within the control of the board author.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/device.c