if (!dev || !dev->driver)
return sizeof(ROOT);
- switch (dev->driver->id) {
+ switch (device_get_uclass_id(dev)) {
case UCLASS_ROOT:
case UCLASS_SIMPLE_BUS:
/* stop traversing parents at this point: */
if (!dev || !dev->driver)
return buf;
- switch (dev->driver->id) {
+ switch (device_get_uclass_id(dev)) {
case UCLASS_ROOT:
case UCLASS_SIMPLE_BUS: {
/* stop traversing parents at this point: */
return &udp[1];
}
default:
- debug("%s(%u) %s: unhandled device class: %s (%u)\n",
- __FILE__, __LINE__, __func__,
- dev->name, dev->driver->id);
+ /* If the uclass driver is missing, this will show NULL */
+ log_debug("unhandled device class: %s (%s)\n", dev->name,
+ dev_get_uclass_name(dev));
return dp_fill(buf, dev->parent);
}
}