forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/drivers/video/fbdev/core/fb_cmdline.c
....@@ -75,36 +75,33 @@
7575 * NOTE: This function is a __setup and __init function.
7676 * It only stores the options. Drivers have to call
7777 * fb_get_options() as necessary.
78
- *
79
- * Returns zero.
80
- *
8178 */
8279 static int __init video_setup(char *options)
8380 {
84
- int i, global = 0;
85
-
8681 if (!options || !*options)
87
- global = 1;
82
+ goto out;
8883
89
- if (!global && !strncmp(options, "ofonly", 6)) {
84
+ if (!strncmp(options, "ofonly", 6)) {
9085 ofonly = 1;
91
- global = 1;
86
+ goto out;
9287 }
9388
94
- if (!global && !strchr(options, ':')) {
95
- fb_mode_option = options;
96
- global = 1;
97
- }
89
+ if (strchr(options, ':')) {
90
+ /* named */
91
+ int i;
9892
99
- if (!global) {
10093 for (i = 0; i < FB_MAX; i++) {
10194 if (video_options[i] == NULL) {
10295 video_options[i] = options;
10396 break;
10497 }
10598 }
99
+ } else {
100
+ /* global */
101
+ fb_mode_option = options;
106102 }
107103
104
+out:
108105 return 1;
109106 }
110107 __setup("video=", video_setup);