| .. | .. |
|---|
| 75 | 75 | * NOTE: This function is a __setup and __init function. |
|---|
| 76 | 76 | * It only stores the options. Drivers have to call |
|---|
| 77 | 77 | * fb_get_options() as necessary. |
|---|
| 78 | | - * |
|---|
| 79 | | - * Returns zero. |
|---|
| 80 | | - * |
|---|
| 81 | 78 | */ |
|---|
| 82 | 79 | static int __init video_setup(char *options) |
|---|
| 83 | 80 | { |
|---|
| 84 | | - int i, global = 0; |
|---|
| 85 | | - |
|---|
| 86 | 81 | if (!options || !*options) |
|---|
| 87 | | - global = 1; |
|---|
| 82 | + goto out; |
|---|
| 88 | 83 | |
|---|
| 89 | | - if (!global && !strncmp(options, "ofonly", 6)) { |
|---|
| 84 | + if (!strncmp(options, "ofonly", 6)) { |
|---|
| 90 | 85 | ofonly = 1; |
|---|
| 91 | | - global = 1; |
|---|
| 86 | + goto out; |
|---|
| 92 | 87 | } |
|---|
| 93 | 88 | |
|---|
| 94 | | - if (!global && !strchr(options, ':')) { |
|---|
| 95 | | - fb_mode_option = options; |
|---|
| 96 | | - global = 1; |
|---|
| 97 | | - } |
|---|
| 89 | + if (strchr(options, ':')) { |
|---|
| 90 | + /* named */ |
|---|
| 91 | + int i; |
|---|
| 98 | 92 | |
|---|
| 99 | | - if (!global) { |
|---|
| 100 | 93 | for (i = 0; i < FB_MAX; i++) { |
|---|
| 101 | 94 | if (video_options[i] == NULL) { |
|---|
| 102 | 95 | video_options[i] = options; |
|---|
| 103 | 96 | break; |
|---|
| 104 | 97 | } |
|---|
| 105 | 98 | } |
|---|
| 99 | + } else { |
|---|
| 100 | + /* global */ |
|---|
| 101 | + fb_mode_option = options; |
|---|
| 106 | 102 | } |
|---|
| 107 | 103 | |
|---|
| 104 | +out: |
|---|
| 108 | 105 | return 1; |
|---|
| 109 | 106 | } |
|---|
| 110 | 107 | __setup("video=", video_setup); |
|---|