summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-08-24 11:27:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-08-24 11:32:44 +0200
commit8a2a5d1604012e6d81acf58a1fd0a5df3bb550ee (patch)
tree629353be091974759befbb40dca8efe39ef0ccda
parent2e58d1bebaa9957bdf1cbc74e1de62ef0e3ec828 (diff)
downloaddt-utils-8a2a5d1604012e6d81acf58a1fd0a5df3bb550ee.tar.gz
libdt: only enumerate devices we are interested in
Only devices of certain subsystems can have device nodes. Limit the enumeration to these subsystems, namely platform, i2c, spi and mtd. pci maybe missing here, but let's see once we are there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--src/libdt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libdt.c b/src/libdt.c
index f69df00..752feab 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -1976,7 +1976,10 @@ static void of_scan_udev_devices(void)
}
enumerate = udev_enumerate_new(udev);
- udev_enumerate_add_match_property(enumerate, "OF_FULLNAME", of_full_path);
+ udev_enumerate_add_match_subsystem(enumerate, "platform");
+ udev_enumerate_add_match_subsystem(enumerate, "i2c");
+ udev_enumerate_add_match_subsystem(enumerate, "spi");
+ udev_enumerate_add_match_subsystem(enumerate, "mtd");
udev_enumerate_scan_devices(enumerate);
devices = udev_enumerate_get_list_entry(enumerate);