Merge tag 'for-linus-5.12b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / include / linux / serial_core.h
index ff63c29..e1b684e 100644 (file)
@@ -357,8 +357,8 @@ struct earlycon_id {
        int     (*setup)(struct earlycon_device *, const char *options);
 };
 
-extern const struct earlycon_id *__earlycon_table[];
-extern const struct earlycon_id *__earlycon_table_end[];
+extern const struct earlycon_id __earlycon_table[];
+extern const struct earlycon_id __earlycon_table_end[];
 
 #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
 #define EARLYCON_USED_OR_UNUSED        __used
@@ -366,19 +366,13 @@ extern const struct earlycon_id *__earlycon_table_end[];
 #define EARLYCON_USED_OR_UNUSED        __maybe_unused
 #endif
 
-#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id)             \
-       static const struct earlycon_id unique_id                       \
-            EARLYCON_USED_OR_UNUSED __initconst                        \
+#define OF_EARLYCON_DECLARE(_name, compat, fn)                         \
+       static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
+               EARLYCON_USED_OR_UNUSED  __section("__earlycon_table")  \
+               __aligned(__alignof__(struct earlycon_id))              \
                = { .name = __stringify(_name),                         \
                    .compatible = compat,                               \
-                   .setup = fn  };                                     \
-       static const struct earlycon_id EARLYCON_USED_OR_UNUSED         \
-               __section("__earlycon_table")                           \
-               * const __PASTE(__p, unique_id) = &unique_id
-
-#define OF_EARLYCON_DECLARE(_name, compat, fn)                         \
-       _OF_EARLYCON_DECLARE(_name, compat, fn,                         \
-                            __UNIQUE_ID(__earlycon_##_name))
+                   .setup = fn }
 
 #define EARLYCON_DECLARE(_name, fn)    OF_EARLYCON_DECLARE(_name, "", fn)