Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_acad.c
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | acpi_acad_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
acpi_acad_probe(device_t dev) | acpi_acad_probe(device_t dev) | ||||
{ | { | ||||
static char *acad_ids[] = { "ACPI0003", NULL }; | static char *acad_ids[] = { "ACPI0003", NULL }; | ||||
int rv; | |||||
if (acpi_disabled("acad") || | if (acpi_disabled("acad")) | ||||
ACPI_ID_PROBE(device_get_parent(dev), dev, acad_ids) == NULL) | |||||
return (ENXIO); | return (ENXIO); | ||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, acad_ids, NULL); | |||||
if (rv <= 0) | |||||
device_set_desc(dev, "AC Adapter"); | device_set_desc(dev, "AC Adapter"); | ||||
return (0); | return (rv); | ||||
} | } | ||||
static int | static int | ||||
acpi_acad_attach(device_t dev) | acpi_acad_attach(device_t dev) | ||||
{ | { | ||||
struct acpi_acad_softc *sc; | struct acpi_acad_softc *sc; | ||||
struct acpi_softc *acpi_sc; | struct acpi_softc *acpi_sc; | ||||
ACPI_HANDLE handle; | ACPI_HANDLE handle; | ||||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |