hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/kernel/printk/braille.c
....@@ -11,11 +11,18 @@
1111
1212 int _braille_console_setup(char **str, char **brl_options)
1313 {
14
- if (!strncmp(*str, "brl,", 4)) {
14
+ size_t len;
15
+
16
+ len = str_has_prefix(*str, "brl,");
17
+ if (len) {
1518 *brl_options = "";
16
- *str += 4;
17
- } else if (!strncmp(*str, "brl=", 4)) {
18
- *brl_options = *str + 4;
19
+ *str += len;
20
+ return 0;
21
+ }
22
+
23
+ len = str_has_prefix(*str, "brl=");
24
+ if (len) {
25
+ *brl_options = *str + len;
1926 *str = strchr(*brl_options, ',');
2027 if (!*str) {
2128 pr_err("need port name after brl=\n");