-/* $OpenBSD: com_acpi.c,v 1.3 2021/12/16 08:03:17 anton Exp $ */
+/* $OpenBSD: com_acpi.c,v 1.4 2021/12/21 06:09:47 anton Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
struct acpi_attach_args *aaa = aux;
struct cfdata *cf = match;
+ if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
+ return 0;
return acpi_matchhids(aaa, com_hids, cf->cf_driver->cd_name);
}
sc->sc_node = aaa->aaa_node;
printf(" %s", sc->sc_node->name);
- if (aaa->aaa_naddr < 1) {
- printf(": no registers\n");
- return;
- }
-
- if (aaa->aaa_nirq < 1) {
- printf(": no interrupt\n");
- return;
- }
-
printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
printf(" irq %d", aaa->aaa_irq[0]);