Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_resource.c
Show First 20 Lines • Show All 690 Lines • ▼ Show 20 Lines | |||||
DRIVER_MODULE(acpi_sysresource, acpi, acpi_sysres_driver, acpi_sysres_devclass, | DRIVER_MODULE(acpi_sysresource, acpi, acpi_sysres_driver, acpi_sysres_devclass, | ||||
0, 0); | 0, 0); | ||||
MODULE_DEPEND(acpi_sysresource, acpi, 1, 1, 1); | MODULE_DEPEND(acpi_sysresource, acpi, 1, 1, 1); | ||||
static int | static int | ||||
acpi_sysres_probe(device_t dev) | acpi_sysres_probe(device_t dev) | ||||
{ | { | ||||
static char *sysres_ids[] = { "PNP0C01", "PNP0C02", NULL }; | static char *sysres_ids[] = { "PNP0C01", "PNP0C02", NULL }; | ||||
int rv; | |||||
if (acpi_disabled("sysresource") || | if (acpi_disabled("sysresource")) | ||||
ACPI_ID_PROBE(device_get_parent(dev), dev, sysres_ids) == NULL) | |||||
return (ENXIO); | return (ENXIO); | ||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, sysres_ids, NULL); | |||||
if (rv > 0){ | |||||
return (rv); | |||||
jhb: I'm not sure about keeping this check. If we do want this, this should be a separate commit as… | |||||
Done Inline Actionsreturn (rv)? jhb: return (rv)? | |||||
} | |||||
device_set_desc(dev, "System Resource"); | device_set_desc(dev, "System Resource"); | ||||
device_quiet(dev); | device_quiet(dev); | ||||
return (BUS_PROBE_DEFAULT); | return (rv); | ||||
} | } | ||||
static int | static int | ||||
acpi_sysres_attach(device_t dev) | acpi_sysres_attach(device_t dev) | ||||
{ | { | ||||
device_t bus; | device_t bus; | ||||
struct resource_list_entry *bus_rle, *dev_rle; | struct resource_list_entry *bus_rle, *dev_rle; | ||||
struct resource_list *bus_rl, *dev_rl; | struct resource_list *bus_rl, *dev_rl; | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |
I'm not sure about keeping this check. If we do want this, this should be a separate commit as it would introduce a behavior change on its own right. However, I'm not sure we want to ignore devices that have SYSRES as a CID. We don't do that today.