diff options
| author | Andrew Turner <andrew@FreeBSD.org> | 2018-02-26 08:45:38 +0000 |
|---|---|---|
| committer | Andrew Turner <andrew@FreeBSD.org> | 2018-02-26 08:45:38 +0000 |
| commit | 104518ad6d1933bf1747be5687f1535497b66881 (patch) | |
| tree | 50851f29966d3a54dfec422c48d7a94d584e9cb5 /sys/dev/uart | |
| parent | 11d5ba38abf929b1a31ca4b9657b252a7bdc326e (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart')
| -rw-r--r-- | sys/dev/uart/uart_cpu_arm64.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/dev/uart/uart_cpu_arm64.c b/sys/dev/uart/uart_cpu_arm64.c index e6265fedc6f0..56a88f73b2bf 100644 --- a/sys/dev/uart/uart_cpu_arm64.c +++ b/sys/dev/uart/uart_cpu_arm64.c @@ -83,16 +83,23 @@ uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) static struct acpi_uart_compat_data * uart_cpu_acpi_scan(uint8_t interface_type) { - struct acpi_uart_compat_data **cd; + struct acpi_uart_compat_data **cd, *curcd; + int i; SET_FOREACH(cd, uart_acpi_class_and_device_set) { - if ((*cd)->port_subtype == interface_type) - return (*cd); + curcd = *cd; + for (i = 0; curcd[i].hid != NULL; i++) { + if (curcd[i].port_subtype == interface_type) + return (&curcd[i]); + } } SET_FOREACH(cd, uart_acpi_class_set) { - if ((*cd)->port_subtype == interface_type) - return (*cd); + curcd = *cd; + for (i = 0; curcd[i].hid != NULL; i++) { + if (curcd[i].port_subtype == interface_type) + return (&curcd[i]); + } } return (NULL); |
