summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorHiroshi DOYU2012-05-11 10:03:09 +0200
committerGreg Kroah-Hartman2012-05-14 17:46:01 +0200
commit094e47e9fa79e28f0e51e37400ea6eea35a4ee1f (patch)
treedb1beb67a3d074f9c40f7ca71611f334566678e1 /include/linux/device.h
parentprintk() - restore prefix/timestamp printing for multi-newline strings (diff)
downloadkernel-qcow2-linux-094e47e9fa79e28f0e51e37400ea6eea35a4ee1f.tar.gz
kernel-qcow2-linux-094e47e9fa79e28f0e51e37400ea6eea35a4ee1f.tar.xz
kernel-qcow2-linux-094e47e9fa79e28f0e51e37400ea6eea35a4ee1f.zip
Driver Core: don't oops with unregistered driver in driver_find_device()
driver_find_device() can be called with an unregistered driver. Need to check driver_private to see if it's populated or not, especially under deferrable probe. In the case that there are 2 drivers, one depends on the other. With -EPROBE_DEFER, two drivers can use deferred probe to ensure that their relative probe order doesn't matter. If dependee driver is probed first, then the dependant's driver_find_device('dependee') succeeds. If the dependant is probed first, then the dependant's driver_find_device('dependee') should return NULL, and the dependant should get -EPROBE_DEFER. driver_find_device() needs to return NULL if it's not populated. In [PATCHv5 2/3] ARM: tegra: Add SMMU enabler in AHB: http://article.gmane.org/gmane.linux.ports.tegra/4658 "tegra_ahb_driver" may not be populated when it's called. For more SMMU/AHB specific discussion, refer to the following thread: https://lkml.org/lkml/2012/5/10/21 Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
0 files changed, 0 insertions, 0 deletions