Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpi_support/acpi_toshiba.c
Show First 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | |||||
* Dynabook SS 3500 | * Dynabook SS 3500 | ||||
* TOS6207 Dynabook SS2110 Series | * TOS6207 Dynabook SS2110 Series | ||||
* TOS6208 SPA40 | * TOS6208 SPA40 | ||||
*/ | */ | ||||
static int | static int | ||||
acpi_toshiba_probe(device_t dev) | acpi_toshiba_probe(device_t dev) | ||||
{ | { | ||||
static char *tosh_ids[] = { "TOS6200", "TOS6207", "TOS6208", NULL }; | static char *tosh_ids[] = { "TOS6200", "TOS6207", "TOS6208", NULL }; | ||||
int rv; | |||||
if (acpi_disabled("toshiba") || | if (acpi_disabled("toshiba") || | ||||
jhb: Blank line here between variables and code. | |||||
ACPI_ID_PROBE(device_get_parent(dev), dev, tosh_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, tosh_ids, NULL); | |||||
if (rv <= 0) | |||||
device_set_desc(dev, "Toshiba HCI Extras"); | device_set_desc(dev, "Toshiba HCI Extras"); | ||||
return (0); | return (rv); | ||||
} | } | ||||
static int | static int | ||||
acpi_toshiba_attach(device_t dev) | acpi_toshiba_attach(device_t dev) | ||||
{ | { | ||||
struct acpi_toshiba_softc *sc; | struct acpi_toshiba_softc *sc; | ||||
struct acpi_softc *acpi_sc; | struct acpi_softc *acpi_sc; | ||||
ACPI_STATUS status; | ACPI_STATUS status; | ||||
▲ Show 20 Lines • Show All 299 Lines • ▼ Show 20 Lines | |||||
* HID Model | * HID Model | ||||
* ------------------------------------- | * ------------------------------------- | ||||
* TOS6201 Libretto L Series | * TOS6201 Libretto L Series | ||||
*/ | */ | ||||
static int | static int | ||||
acpi_toshiba_video_probe(device_t dev) | acpi_toshiba_video_probe(device_t dev) | ||||
{ | { | ||||
static char *vid_ids[] = { "TOS6201", NULL }; | static char *vid_ids[] = { "TOS6201", NULL }; | ||||
int rv; | |||||
if (acpi_disabled("toshiba") || | if (acpi_disabled("toshiba") || | ||||
ACPI_ID_PROBE(device_get_parent(dev), dev, vid_ids) == NULL || | |||||
device_get_unit(dev) != 0) | device_get_unit(dev) != 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
device_quiet(dev); | device_quiet(dev); | ||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, vid_ids, NULL); | |||||
if (rv <= 0) | |||||
device_set_desc(dev, "Toshiba Video"); | device_set_desc(dev, "Toshiba Video"); | ||||
return (0); | return (rv); | ||||
} | } | ||||
static int | static int | ||||
acpi_toshiba_video_attach(device_t dev) | acpi_toshiba_video_attach(device_t dev) | ||||
{ | { | ||||
struct acpi_toshiba_softc *sc; | struct acpi_toshiba_softc *sc; | ||||
sc = devclass_get_softc(acpi_toshiba_devclass, 0); | sc = devclass_get_softc(acpi_toshiba_devclass, 0); | ||||
if (sc == NULL) | if (sc == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
sc->video_handle = acpi_get_handle(dev); | sc->video_handle = acpi_get_handle(dev); | ||||
return (0); | return (0); | ||||
} | } |
Blank line here between variables and code.