rk_pinctrl: Only add gpio subnode

This is the only node we are interested in so do not waste time to test
creating device that will be either unused or fail as most of the nodes
don't have a compatible string.
This commit is contained in:
Emmanuel Vadot 2018-06-14 05:41:16 +00:00
parent 4aec110f70
commit b1b521b1d5

View File

@ -438,6 +438,8 @@ rk_pinctrl_attach(device_t dev)
/* Attach child devices */
for (node = OF_child(node); node > 0; node = OF_peer(node)) {
if (!ofw_bus_node_is_compatible(node, "rockchip,gpio-bank"))
continue;
cdev = simplebus_add_device(dev, node, 0, NULL, -1, NULL);
if (cdev != NULL)
device_probe_and_attach(cdev);