diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:14:55 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:14:55 -0700 |
commit | 7b6c81f46c5dd7af316bf09aa1991ceed7e53dcd (patch) | |
tree | 21e779c6c6d68a41ffd640228359eac060c2e0fe /include/linux/serial_core.h | |
parent | 0a84bae7edfb44b50978225c6819c59edfebf645 (diff) | |
parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
download | blackbird-op-linux-7b6c81f46c5dd7af316bf09aa1991ceed7e53dcd.tar.gz blackbird-op-linux-7b6c81f46c5dd7af316bf09aa1991ceed7e53dcd.zip |
Merge 4.17-rc3 into tty-next
We want the tty and serial driver fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d2a2e4bc2435..06ea4eeb09ab 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -353,10 +353,10 @@ struct earlycon_id { char name_term; /* In case compiler didn't '\0' term name */ char compatible[128]; int (*setup)(struct earlycon_device *, const char *options); -} __aligned(32); +}; -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 @@ -364,12 +364,19 @@ extern const struct earlycon_id __earlycon_table_end[]; #define EARLYCON_USED_OR_UNUSED __maybe_unused #endif -#define OF_EARLYCON_DECLARE(_name, compat, fn) \ - static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \ - EARLYCON_USED_OR_UNUSED __section(__earlycon_table) \ +#define _OF_EARLYCON_DECLARE(_name, compat, fn, unique_id) \ + static const struct earlycon_id unique_id \ + EARLYCON_USED_OR_UNUSED __initconst \ = { .name = __stringify(_name), \ .compatible = compat, \ - .setup = fn } + .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)) #define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn) |