diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h --- a/sys/dev/uart/uart_bus.h +++ b/sys/dev/uart/uart_bus.h @@ -70,6 +70,9 @@ u_int uc_riowidth; /* Default reg io width for this device. */ }; +#define UART_CLASS(class) \ + DATA_SET(uart_class_set, class) + struct uart_softc { KOBJ_FIELDS; struct uart_class *sc_class; diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -451,7 +451,7 @@ .uc_rclk = DEFAULT_RCLK, .uc_rshift = 0 }; -DATA_SET(uart_class_set, uart_ns8250_class); +UART_CLASS(uart_ns8250_class); /* * XXX -- refactor out ACPI and FDT ifdefs diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -340,7 +340,7 @@ .uc_rclk = 0, .uc_rshift = 2 }; -DATA_SET(uart_class_set, uart_pl011_class); +UART_CLASS(uart_pl011_class); #ifdef FDT static struct ofw_compat_data fdt_compat_data[] = { diff --git a/sys/dev/uart/uart_dev_quicc.c b/sys/dev/uart/uart_dev_quicc.c --- a/sys/dev/uart/uart_dev_quicc.c +++ b/sys/dev/uart/uart_dev_quicc.c @@ -273,6 +273,7 @@ .uc_rclk = DEFAULT_RCLK, .uc_rshift = 0 }; +UART_CLASS(uart_quicc_class); #define SIGCHG(c, i, s, d) \ if (c) { \ diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c --- a/sys/dev/uart/uart_dev_z8530.c +++ b/sys/dev/uart/uart_dev_z8530.c @@ -309,7 +309,7 @@ .uc_rclk = DEFAULT_RCLK, .uc_rshift = 0 }; -DATA_SET(uart_class_set, uart_z8530_class); +UART_CLASS(uart_z8530_class); #define SIGCHG(c, i, s, d) \ if (c) { \