aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-12 23:46:58 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:16:59 -0400
commit2ead9439f0c6ed03faafe27abe8bc1dd256d117b (patch)
tree373004102baf74b539dae01edbdabe13e341c310 /drivers/video
parentfddd520122953550ec2c8b60e7ca0d0f0d115d97 (diff)
uvesafb: improve parameter handling.
1) Now module_param(..., invbool, ...) requires a bool, and similarly module_param(..., bool, ...) allows it, change pmi_setpal to a bool. 2) #define param_get_scroll to NULL, since it can never be called (perm argument to module_param_named is 0). 3) Return -EINVAL from param_set_scroll if the value is bad, so it's reported. Note that I don't think the old fb_get_options() is required for new drivers: the parameters automatically work as uvesafb.XXX=... anyway. Acked-by: MichaƂ Januszewski <spock@gentoo.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/uvesafb.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/video/uvesafb.c b/drivers/video/uvesafb.c
index 421770b5e6ab..ca5b4643a401 100644
--- a/drivers/video/uvesafb.c
+++ b/drivers/video/uvesafb.c
@@ -45,7 +45,7 @@ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = {
45static int mtrr __devinitdata = 3; /* enable mtrr by default */ 45static int mtrr __devinitdata = 3; /* enable mtrr by default */
46static int blank = 1; /* enable blanking by default */ 46static int blank = 1; /* enable blanking by default */
47static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ 47static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */
48static int pmi_setpal __devinitdata = 1; /* use PMI for palette changes */ 48static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */
49static int nocrtc __devinitdata; /* ignore CRTC settings */ 49static int nocrtc __devinitdata; /* ignore CRTC settings */
50static int noedid __devinitdata; /* don't try DDC transfers */ 50static int noedid __devinitdata; /* don't try DDC transfers */
51static int vram_remap __devinitdata; /* set amt. of memory to be used */ 51static int vram_remap __devinitdata; /* set amt. of memory to be used */
@@ -2002,11 +2002,7 @@ static void __devexit uvesafb_exit(void)
2002 2002
2003module_exit(uvesafb_exit); 2003module_exit(uvesafb_exit);
2004 2004
2005static int param_get_scroll(char *buffer, struct kernel_param *kp) 2005#define param_get_scroll NULL
2006{
2007 return 0;
2008}
2009
2010static int param_set_scroll(const char *val, struct kernel_param *kp) 2006static int param_set_scroll(const char *val, struct kernel_param *kp)
2011{ 2007{
2012 ypan = 0; 2008 ypan = 0;
@@ -2017,6 +2013,8 @@ static int param_set_scroll(const char *val, struct kernel_param *kp)
2017 ypan = 1; 2013 ypan = 1;
2018 else if (!strcmp(val, "ywrap")) 2014 else if (!strcmp(val, "ywrap"))
2019 ypan = 2; 2015 ypan = 2;
2016 else
2017 return -EINVAL;
2020 2018
2021 return 0; 2019 return 0;
2022} 2020}