diff options
author | 2018-08-03 22:18:13 +0000 | |
---|---|---|
committer | 2018-08-03 22:18:13 +0000 | |
commit | e3ba7f7856adaa90dc89385d36b59e1d22c08cc7 (patch) | |
tree | 9ca371b9ad5c5b15c3690e9941354be805ce2f61 /sys/dev/acpi/ahci_acpi.c | |
parent | Implement setting the CPU clock for Allwinner H3/H5 SoCs. (diff) | |
download | wireguard-openbsd-e3ba7f7856adaa90dc89385d36b59e1d22c08cc7.tar.xz wireguard-openbsd-e3ba7f7856adaa90dc89385d36b59e1d22c08cc7.zip |
Let ahci(4) match on _CLS instead of _HID when attaching at acpi(4). Avoids
having to add many more _HID entries to the match table.
ok deraadt@, mlarkin@
Diffstat (limited to 'sys/dev/acpi/ahci_acpi.c')
-rw-r--r-- | sys/dev/acpi/ahci_acpi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/acpi/ahci_acpi.c b/sys/dev/acpi/ahci_acpi.c index 6976e4cb8f7..07438337e10 100644 --- a/sys/dev/acpi/ahci_acpi.c +++ b/sys/dev/acpi/ahci_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci_acpi.c,v 1.1 2018/07/01 15:54:59 kettenis Exp $ */ +/* $OpenBSD: ahci_acpi.c,v 1.2 2018/08/03 22:18:13 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -49,21 +49,15 @@ struct cfattach ahci_acpi_ca = { sizeof(struct ahci_acpi_softc), ahci_acpi_match, ahci_acpi_attach }; -const char *ahci_hids[] = { - "AMDI0600", - "LNRO001E", - NULL -}; - int ahci_acpi_parse_resources(int, union acpi_resource *, void *); int ahci_acpi_match(struct device *parent, void *match, void *aux) { struct acpi_attach_args *aaa = aux; - struct cfdata *cf = match; - return acpi_matchhids(aaa, ahci_hids, cf->cf_driver->cd_name); + return acpi_matchcls(aaa, PCI_CLASS_MASS_STORAGE, + PCI_SUBCLASS_MASS_STORAGE_SATA, PCI_INTERFACE_SATA_AHCI10); } void |