diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-04-28 05:15:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:37 -0400 |
commit | 07f41e45f8c1caf366b382b6b9654ebd0a4efc90 (patch) | |
tree | 2cd84ed1b2ad09e2face69575baa51ccdcc7851f /drivers/video | |
parent | 5eb81e808de6f49af1dd74db68876a79da1314a5 (diff) |
tridentfb: change option mode to mode_option
Change the option "mode_option" into "mode". It also adds __init attribute to
tridentfb_setup function.
This is one step toward changing all fb drivers to have common "mode_option"
parameter.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Alain Kalker <miki@dds.nl>
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')
-rw-r--r-- | drivers/video/tridentfb.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 0a4e07d43d2d..46669c669586 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -58,7 +58,7 @@ static int displaytype; | |||
58 | /* defaults which are normally overriden by user values */ | 58 | /* defaults which are normally overriden by user values */ |
59 | 59 | ||
60 | /* video mode */ | 60 | /* video mode */ |
61 | static char *mode = "640x480"; | 61 | static char *mode_option __devinitdata = "640x480"; |
62 | static int bpp = 8; | 62 | static int bpp = 8; |
63 | 63 | ||
64 | static int noaccel; | 64 | static int noaccel; |
@@ -73,7 +73,8 @@ static int memsize; | |||
73 | static int memdiff; | 73 | static int memdiff; |
74 | static int nativex; | 74 | static int nativex; |
75 | 75 | ||
76 | module_param(mode, charp, 0); | 76 | module_param(mode_option, charp, 0); |
77 | MODULE_PARM_DESC(mode_option, "Initial video mode e.g. '648x480-8@60'"); | ||
77 | module_param(bpp, int, 0); | 78 | module_param(bpp, int, 0); |
78 | module_param(center, int, 0); | 79 | module_param(center, int, 0); |
79 | module_param(stretch, int, 0); | 80 | module_param(stretch, int, 0); |
@@ -1297,7 +1298,8 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, | |||
1297 | #endif | 1298 | #endif |
1298 | fb_info.pseudo_palette = pseudo_pal; | 1299 | fb_info.pseudo_palette = pseudo_pal; |
1299 | 1300 | ||
1300 | if (!fb_find_mode(&default_var, &fb_info, mode, NULL, 0, NULL, bpp)) { | 1301 | if (!fb_find_mode(&default_var, &fb_info, |
1302 | mode_option, NULL, 0, NULL, bpp)) { | ||
1301 | err = -EINVAL; | 1303 | err = -EINVAL; |
1302 | goto out_unmap2; | 1304 | goto out_unmap2; |
1303 | } | 1305 | } |
@@ -1385,7 +1387,7 @@ static struct pci_driver tridentfb_pci_driver = { | |||
1385 | * video=trident:800x600,bpp=16,noaccel | 1387 | * video=trident:800x600,bpp=16,noaccel |
1386 | */ | 1388 | */ |
1387 | #ifndef MODULE | 1389 | #ifndef MODULE |
1388 | static int tridentfb_setup(char *options) | 1390 | static int __init tridentfb_setup(char *options) |
1389 | { | 1391 | { |
1390 | char *opt; | 1392 | char *opt; |
1391 | if (!options || !*options) | 1393 | if (!options || !*options) |
@@ -1412,7 +1414,7 @@ static int tridentfb_setup(char *options) | |||
1412 | else if (!strncmp(opt, "nativex=", 8)) | 1414 | else if (!strncmp(opt, "nativex=", 8)) |
1413 | nativex = simple_strtoul(opt + 8, NULL, 0); | 1415 | nativex = simple_strtoul(opt + 8, NULL, 0); |
1414 | else | 1416 | else |
1415 | mode = opt; | 1417 | mode_option = opt; |
1416 | } | 1418 | } |
1417 | return 0; | 1419 | return 0; |
1418 | } | 1420 | } |