diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-04-28 05:15:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:37 -0400 |
commit | a81405439c4e9f710f75c41503cef5a5dbd39e4d (patch) | |
tree | 70c0ac20ccf5d8dfcdee6714d590f1910fb92bd4 /drivers/video/s3fb.c | |
parent | 1abf91729faf2fd9b16b5987a68fb99fe5dcc75a (diff) |
s3fb: add option mode_option
Add the option "mode_option". It also moves mtrr variable to devinitdata
section.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/s3fb.c')
-rw-r--r-- | drivers/video/s3fb.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c index 7d53bc23b9c7..649cdd213d0f 100644 --- a/drivers/video/s3fb.c +++ b/drivers/video/s3fb.c | |||
@@ -132,10 +132,10 @@ static const struct svga_timing_regs s3_timing_regs = { | |||
132 | /* Module parameters */ | 132 | /* Module parameters */ |
133 | 133 | ||
134 | 134 | ||
135 | static char *mode = "640x480-8@60"; | 135 | static char *mode_option __devinitdata = "640x480-8@60"; |
136 | 136 | ||
137 | #ifdef CONFIG_MTRR | 137 | #ifdef CONFIG_MTRR |
138 | static int mtrr = 1; | 138 | static int mtrr __devinitdata = 1; |
139 | #endif | 139 | #endif |
140 | 140 | ||
141 | static int fasttext = 1; | 141 | static int fasttext = 1; |
@@ -145,8 +145,10 @@ MODULE_AUTHOR("(c) 2006-2007 Ondrej Zajicek <santiago@crfreenet.org>"); | |||
145 | MODULE_LICENSE("GPL"); | 145 | MODULE_LICENSE("GPL"); |
146 | MODULE_DESCRIPTION("fbdev driver for S3 Trio/Virge"); | 146 | MODULE_DESCRIPTION("fbdev driver for S3 Trio/Virge"); |
147 | 147 | ||
148 | module_param(mode, charp, 0444); | 148 | module_param(mode_option, charp, 0444); |
149 | MODULE_PARM_DESC(mode, "Default video mode ('640x480-8@60', etc)"); | 149 | MODULE_PARM_DESC(mode_option, "Default video mode ('640x480-8@60', etc)"); |
150 | module_param_named(mode, mode_option, charp, 0444); | ||
151 | MODULE_PARM_DESC(mode, "Default video mode ('640x480-8@60', etc) (deprecated)"); | ||
150 | 152 | ||
151 | #ifdef CONFIG_MTRR | 153 | #ifdef CONFIG_MTRR |
152 | module_param(mtrr, int, 0444); | 154 | module_param(mtrr, int, 0444); |
@@ -960,10 +962,10 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i | |||
960 | info->pseudo_palette = (void*) (par->pseudo_palette); | 962 | info->pseudo_palette = (void*) (par->pseudo_palette); |
961 | 963 | ||
962 | /* Prepare startup mode */ | 964 | /* Prepare startup mode */ |
963 | rc = fb_find_mode(&(info->var), info, mode, NULL, 0, NULL, 8); | 965 | rc = fb_find_mode(&(info->var), info, mode_option, NULL, 0, NULL, 8); |
964 | if (! ((rc == 1) || (rc == 2))) { | 966 | if (! ((rc == 1) || (rc == 2))) { |
965 | rc = -EINVAL; | 967 | rc = -EINVAL; |
966 | dev_err(&(dev->dev), "mode %s not found\n", mode); | 968 | dev_err(&(dev->dev), "mode %s not found\n", mode_option); |
967 | goto err_find_mode; | 969 | goto err_find_mode; |
968 | } | 970 | } |
969 | 971 | ||
@@ -1168,7 +1170,7 @@ static int __init s3fb_setup(char *options) | |||
1168 | else if (!strncmp(opt, "fasttext:", 9)) | 1170 | else if (!strncmp(opt, "fasttext:", 9)) |
1169 | fasttext = simple_strtoul(opt + 9, NULL, 0); | 1171 | fasttext = simple_strtoul(opt + 9, NULL, 0); |
1170 | else | 1172 | else |
1171 | mode = opt; | 1173 | mode_option = opt; |
1172 | } | 1174 | } |
1173 | 1175 | ||
1174 | return 0; | 1176 | return 0; |