]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/core/device.c
devres: make Devres optional with CONFIG_DEVRES
[people/ms/u-boot.git] / drivers / core / device.c
index e3a42dc928f0cc311863c3e356fd0cee5a870fb8..caaf2319214a58ca56387232d74c2bd3213bab7d 100644 (file)
@@ -47,7 +47,9 @@ int device_bind(struct udevice *parent, const struct driver *drv,
        INIT_LIST_HEAD(&dev->sibling_node);
        INIT_LIST_HEAD(&dev->child_head);
        INIT_LIST_HEAD(&dev->uclass_node);
+#ifdef CONFIG_DEVRES
        INIT_LIST_HEAD(&dev->devres_head);
+#endif
        dev->platdata = platdata;
        dev->name = name;
        dev->of_offset = of_offset;