Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ichiic/ig4_acpi.c
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | static char *ig4iic_ids[] = { | ||||
NULL | NULL | ||||
}; | }; | ||||
static int | static int | ||||
ig4iic_acpi_probe(device_t dev) | ig4iic_acpi_probe(device_t dev) | ||||
{ | { | ||||
ig4iic_softc_t *sc; | ig4iic_softc_t *sc; | ||||
char *hid; | char *hid; | ||||
int rv; | |||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
if (acpi_disabled("ig4iic")) | if (acpi_disabled("ig4iic")) | ||||
return (ENXIO); | return (ENXIO); | ||||
rv = ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids, &hid); | |||||
if (rv > 0){ | |||||
return (rv); | |||||
} | |||||
hid = ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids); | |||||
if (hid == NULL) | |||||
return (ENXIO); | |||||
if (strcmp("AMDI0010", hid) == 0) | if (strcmp("AMDI0010", hid) == 0) | ||||
sc->access_intr_mask = 1; | sc->access_intr_mask = 1; | ||||
if (rv <= 0) | |||||
device_set_desc(dev, "Designware I2C Controller"); | device_set_desc(dev, "Designware I2C Controller"); | ||||
return (0); | return (rv); | ||||
} | } | ||||
jhb: Space after 'if' | |||||
static int | static int | ||||
ig4iic_acpi_attach(device_t dev) | ig4iic_acpi_attach(device_t dev) | ||||
{ | { | ||||
ig4iic_softc_t *sc; | ig4iic_softc_t *sc; | ||||
int error; | int error; | ||||
sc = device_get_softc(dev); | sc = device_get_softc(dev); | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |
Space after 'if'