If we initialize and enable devices in the order that they are found
in the tree, instead of the order that they were added to the list, it
simplifies the code. It also makes it so that removing a device from
the devicetree.cb file won't change when its resources are enabled.
I had the devices initialize depth first, but changed it to breadth
first. I think it makes more sense to have all the children of a
device initialized together. I could be talked out of that.
This patch breaks the s2881, which was doing some odd acrobatics in
order to get a device initialized after its parent. It should be an
easy fix to do it correctly now, but I don't have an s2881 to test on.
Ward?
Changes:
1. Remove global enable_resources(child) and calls to it from bridges
2. Make root_dev_* functions local to the root_device
3. Make ".init=init_func," consistent. Some were using ".init=&init_func,"
4. Remove comments about indirect mutual recursion since it isn't anymore
Signed-off-by: Myles Watson <mylesgw(a)gmail.com>
Thanks,
Myles