The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=46a968ecfb57ed3e7429c5ca9b184a8efe4e3d83

commit 46a968ecfb57ed3e7429c5ca9b184a8efe4e3d83
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2024-02-19 20:40:03 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2024-02-22 22:43:22 +0000

    dev/uart: name uart_class_set DATA_SET macro UART_CLASS()
    
    Use the macro "UART_CLASS()" for the newly created data set
    'uart_class_set' as we do for other data sets.
    This further hides the data set name.
    Also add UART_CLASS for quicc, which was previously not done.
    
    MFC after:      1 week
    Improves:       949670f8f466 dev/uart: Use a linker set to find uart classes
    Obtained from:  jhb, 
https://github.com/freebsd/freebsd/commit/269e99ac86902127bfaee1500d8747a3c7be5912
    Reviewed by:    andrew
    Differential Revision: https://reviews.freebsd.org/D43981
---
 sys/dev/uart/uart_bus.h        | 3 +++
 sys/dev/uart/uart_dev_ns8250.c | 2 +-
 sys/dev/uart/uart_dev_pl011.c  | 2 +-
 sys/dev/uart/uart_dev_quicc.c  | 1 +
 sys/dev/uart/uart_dev_z8530.c  | 2 +-
 5 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h
index e42ab7f5f0ba..ccf8ad06a8ec 100644
--- a/sys/dev/uart/uart_bus.h
+++ b/sys/dev/uart/uart_bus.h
@@ -70,6 +70,9 @@ struct uart_class {
        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
index f660639862ff..16c3cb2fc5a9 100644
--- a/sys/dev/uart/uart_dev_ns8250.c
+++ b/sys/dev/uart/uart_dev_ns8250.c
@@ -451,7 +451,7 @@ struct uart_class uart_ns8250_class = {
        .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
index d91ae256f2a3..daba9d19704c 100644
--- a/sys/dev/uart/uart_dev_pl011.c
+++ b/sys/dev/uart/uart_dev_pl011.c
@@ -340,7 +340,7 @@ static struct uart_class uart_pl011_class = {
        .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
index 444efb8c933d..bd735f2da6f4 100644
--- a/sys/dev/uart/uart_dev_quicc.c
+++ b/sys/dev/uart/uart_dev_quicc.c
@@ -273,6 +273,7 @@ struct uart_class uart_quicc_class = {
        .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
index 107fcb1eb4ba..2ca480a5690d 100644
--- a/sys/dev/uart/uart_dev_z8530.c
+++ b/sys/dev/uart/uart_dev_z8530.c
@@ -309,7 +309,7 @@ struct uart_class uart_z8530_class = {
        .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) {                                        \

Reply via email to