* Enable the resources for devices on a link. * * Enable resources of the device by calling the device specific * enable_resources() method. * * The parent's resources should be enabled first to avoid having enabling * order problem. This is done by calling the parent's enable_resources() * method before its children's enable_resources() methods. * * @param link The link whose devices' re
| 332 | * @param link The link whose devices' resources are to be enabled. |
| 333 | */ |
| 334 | static void enable_resources(struct bus *link) |
| 335 | { |
| 336 | struct device *dev; |
| 337 | |
| 338 | for (dev = link->children; dev; dev = dev->sibling) { |
| 339 | if (dev->enabled && dev->ops && dev->ops->enable_resources) { |
| 340 | post_log_path(dev); |
| 341 | dev->ops->enable_resources(dev); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | for (dev = link->children; dev; dev = dev->sibling) { |
| 346 | if (dev->downstream) |
| 347 | enable_resources(dev->downstream); |
| 348 | } |
| 349 | post_log_clear(); |
| 350 | } |
| 351 | |
| 352 | /** |
| 353 | * Reset all of the devices on a bus and clear the bus's reset_needed flag. |
no test coverage detected