MCPcopy Create free account
hub / github.com/coreboot/coreboot / dev_find_class

Function dev_find_class

src/device/device_util.c:67–78  ·  view source on GitHub ↗

* Find a device of a given class. * * @param class Class of the device. * @param from Pointer to the device structure, used as a starting point in * the linked list of all_devices, which can be 0 to start at the * head of the list (i.e. all_devices). * @return Pointer to the device struct. */

Source from the content-addressed store, hash-verified

65 * @return Pointer to the device struct.
66 */
67struct device *dev_find_class(unsigned int class, struct device *from)
68{
69 if (!from)
70 from = all_devices;
71 else
72 from = from->next;
73
74 while (from && (from->class & 0xffffff00) != class)
75 from = from->next;
76
77 return from;
78}
79
80/**
81 * Encode the device path into 3 bytes for logging to CMOS.

Callers 2

set_vga_bridge_bitsFunction · 0.85
soc_get_ioapic_infoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected