summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2017-01-12 12:20:05 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-13 08:35:12 +0100
commit90abfd3fba8dbc8d5d350081fb63681b57ceafa4 (patch)
tree94e78152c39e032205a144d36c566f95267ffcf7 /drivers
parent4f836c3c3c7ac57121775c15c945d8b82e897b3a (diff)
downloadbarebox-90abfd3fba8dbc8d5d350081fb63681b57ceafa4.tar.gz
barebox-90abfd3fba8dbc8d5d350081fb63681b57ceafa4.tar.xz
of_path: only handle no driver for device if it is on a bus
This fixes a regression in __of_find_path() for flash devices created by the cadence-quadspi driver, which do not have 'dev->driver' set. Such devices do not have 'dev->bus' set either, so we can use that to qualify the existing test. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/of/of_path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 946b9c7aa1..e0b2dc1247 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -66,7 +66,7 @@ static int __of_find_path(struct device_node *node, const char *part, char **out
return -ENODEV;
}
- if (!dev->driver)
+ if (dev->bus && !dev->driver)
return -ENODEV;
device_detect(dev);