Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ofw/ofw_pci.c
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
MODULE_VERSION(ofw_pci, 1); | MODULE_VERSION(ofw_pci, 1); | ||||
static int | static int | ||||
ofw_pci_probe(device_t dev) | ofw_pci_probe(device_t dev) | ||||
{ | { | ||||
device_t parent; | device_t parent; | ||||
parent = device_get_parent(dev); | parent = device_get_parent(dev); | ||||
if (ofw_bus_get_node(parent) <= 0) | if (ofw_bus_get_node(parent) == -1) | ||||
return (ENXIO); | return (ENXIO); | ||||
device_set_desc(dev, "OFW PCI bus"); | device_set_desc(dev, "OFW PCI bus"); | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
/* Pass the request up to our parent. */ | /* Pass the request up to our parent. */ | ||||
static const struct ofw_bus_devinfo* | static const struct ofw_bus_devinfo* | ||||
pci_ofw_get_devinfo(device_t bus, device_t dev) | pci_ofw_get_devinfo(device_t bus, device_t dev) | ||||
{ | { | ||||
return OFW_BUS_GET_DEVINFO(device_get_parent(bus), dev); | return OFW_BUS_GET_DEVINFO(device_get_parent(bus), dev); | ||||
} | } |