Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpi_support/acpi_ibm.c
Show First 20 Lines • Show All 343 Lines • ▼ Show 20 Lines | static driver_t acpi_ibm_driver = { | ||||
sizeof(struct acpi_ibm_softc), | sizeof(struct acpi_ibm_softc), | ||||
}; | }; | ||||
static devclass_t acpi_ibm_devclass; | static devclass_t acpi_ibm_devclass; | ||||
DRIVER_MODULE(acpi_ibm, acpi, acpi_ibm_driver, acpi_ibm_devclass, | DRIVER_MODULE(acpi_ibm, acpi, acpi_ibm_driver, acpi_ibm_devclass, | ||||
0, 0); | 0, 0); | ||||
MODULE_DEPEND(acpi_ibm, acpi, 1, 1, 1); | MODULE_DEPEND(acpi_ibm, acpi, 1, 1, 1); | ||||
static char *ibm_ids[] = {"IBM0068", "LEN0068", NULL}; | static char *ibm_ids[] = {"IBM0068", "LEN0068", NULL}; | ||||
imp: This might be unrelated.
| |||||
static void | static void | ||||
ibm_led(void *softc, int onoff) | ibm_led(void *softc, int onoff) | ||||
{ | { | ||||
struct acpi_ibm_softc* sc = (struct acpi_ibm_softc*) softc; | struct acpi_ibm_softc* sc = (struct acpi_ibm_softc*) softc; | ||||
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | acpi_ibm_mic_led_set (struct acpi_ibm_softc *sc, int arg) | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
acpi_ibm_probe(device_t dev) | acpi_ibm_probe(device_t dev) | ||||
{ | { | ||||
int rv; | |||||
if (acpi_disabled("ibm") || | if (acpi_disabled("ibm") || | ||||
ACPI_ID_PROBE(device_get_parent(dev), dev, ibm_ids) == NULL || | |||||
device_get_unit(dev) != 0) | device_get_unit(dev) != 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, ibm_ids, NULL); | |||||
if (rv <= 0) | |||||
device_set_desc(dev, "IBM ThinkPad ACPI Extras"); | device_set_desc(dev, "IBM ThinkPad ACPI Extras"); | ||||
Done Inline ActionsI would check the indent on this line, should be two tabs. jhb: I would check the indent on this line, should be two tabs. | |||||
return (0); | return (rv); | ||||
Done Inline Actionsstyle nit: there should be a space between if and (. imp: style nit: there should be a space between if and (. | |||||
} | } | ||||
static int | static int | ||||
acpi_ibm_attach(device_t dev) | acpi_ibm_attach(device_t dev) | ||||
{ | { | ||||
int i; | int i; | ||||
struct acpi_ibm_softc *sc; | struct acpi_ibm_softc *sc; | ||||
char *maker, *product; | char *maker, *product; | ||||
▲ Show 20 Lines • Show All 948 Lines • Show Last 20 Lines |
This might be unrelated.