* Reset all of the devices on a bus and clear the bus's reset_needed flag. * * @param bus Pointer to the bus structure. * @return 1 if the bus was successfully reset, 0 otherwise. */
| 356 | * @return 1 if the bus was successfully reset, 0 otherwise. |
| 357 | */ |
| 358 | int reset_bus(struct bus *bus) |
| 359 | { |
| 360 | if (bus && bus->dev && bus->dev->ops && bus->dev->ops->reset_bus) { |
| 361 | bus->dev->ops->reset_bus(bus); |
| 362 | bus->reset_needed = 0; |
| 363 | return 1; |
| 364 | } |
| 365 | return 0; |
| 366 | } |
| 367 | |
| 368 | /** |
| 369 | * Scan for devices on a bus. |