diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/fdt.c | 7 | ||||
-rw-r--r-- | drivers/tty/serial/earlycon.c | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 84aa9d676375..6da20b9688f7 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -942,7 +942,7 @@ int __init early_init_dt_scan_chosen_stdout(void) | |||
942 | int offset; | 942 | int offset; |
943 | const char *p, *q, *options = NULL; | 943 | const char *p, *q, *options = NULL; |
944 | int l; | 944 | int l; |
945 | const struct earlycon_id *match; | 945 | const struct earlycon_id **p_match; |
946 | const void *fdt = initial_boot_params; | 946 | const void *fdt = initial_boot_params; |
947 | 947 | ||
948 | offset = fdt_path_offset(fdt, "/chosen"); | 948 | offset = fdt_path_offset(fdt, "/chosen"); |
@@ -969,7 +969,10 @@ int __init early_init_dt_scan_chosen_stdout(void) | |||
969 | return 0; | 969 | return 0; |
970 | } | 970 | } |
971 | 971 | ||
972 | for (match = __earlycon_table; match < __earlycon_table_end; match++) { | 972 | for (p_match = __earlycon_table; p_match < __earlycon_table_end; |
973 | p_match++) { | ||
974 | const struct earlycon_id *match = *p_match; | ||
975 | |||
973 | if (!match->compatible[0]) | 976 | if (!match->compatible[0]) |
974 | continue; | 977 | continue; |
975 | 978 | ||
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index a24278380fec..22683393a0f2 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c | |||
@@ -169,7 +169,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match) | |||
169 | */ | 169 | */ |
170 | int __init setup_earlycon(char *buf) | 170 | int __init setup_earlycon(char *buf) |
171 | { | 171 | { |
172 | const struct earlycon_id *match; | 172 | const struct earlycon_id **p_match; |
173 | 173 | ||
174 | if (!buf || !buf[0]) | 174 | if (!buf || !buf[0]) |
175 | return -EINVAL; | 175 | return -EINVAL; |
@@ -177,7 +177,9 @@ int __init setup_earlycon(char *buf) | |||
177 | if (early_con.flags & CON_ENABLED) | 177 | if (early_con.flags & CON_ENABLED) |
178 | return -EALREADY; | 178 | return -EALREADY; |
179 | 179 | ||
180 | for (match = __earlycon_table; match < __earlycon_table_end; match++) { | 180 | for (p_match = __earlycon_table; p_match < __earlycon_table_end; |
181 | p_match++) { | ||
182 | const struct earlycon_id *match = *p_match; | ||
181 | size_t len = strlen(match->name); | 183 | size_t len = strlen(match->name); |
182 | 184 | ||
183 | if (strncmp(buf, match->name, len)) | 185 | if (strncmp(buf, match->name, len)) |