Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi_acad.c
Show All 12 Lines | |||||
error = acpi_register_ioctl(ACPIIO_ACAD_GET_STATUS, acpi_acad_ioctl, dev); | error = acpi_register_ioctl(ACPIIO_ACAD_GET_STATUS, acpi_acad_ioctl, dev); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
if (device_get_unit(dev) == 0) { | if (device_get_unit(dev) == 0) { | ||||
acpi_sc = acpi_device_get_parent_softc(dev); | acpi_sc = acpi_device_get_parent_softc(dev); | ||||
SYSCTL_ADD_PROC(&acpi_sc->acpi_sysctl_ctx, | SYSCTL_ADD_PROC(&acpi_sc->acpi_sysctl_ctx, | ||||
SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), | SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), | ||||
OID_AUTO, "acline", CTLTYPE_INT | CTLFLAG_RD, | OID_AUTO, "acline", | ||||
CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, | |||||
&sc->status, 0, acpi_acad_sysctl, "I", ""); | &sc->status, 0, acpi_acad_sysctl, "I", ""); | ||||
} | } | ||||
/* Get initial status after whole system is up. */ | /* Get initial status after whole system is up. */ | ||||
sc->status = -1; | sc->status = -1; | ||||
/* | /* | ||||
* Install both system and device notify handlers since the Casio | * Install both system and device notify handlers since the Casio | ||||
Show All 12 Lines |