diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2010-12-20 16:05:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-21 08:26:08 +0100 |
commit | fed63e249dfdd6bf4171d407e1fb27cba9db47b1 (patch) | |
tree | 7da512b35907c74923738f05a3feb878a0865c2c /drivers/video | |
parent | 11c523d784d96d3de378c98b5f6a586300c449f8 (diff) | |
download | barebox-fed63e249dfdd6bf4171d407e1fb27cba9db47b1.tar.gz barebox-fed63e249dfdd6bf4171d407e1fb27cba9db47b1.tar.xz |
Fix default framebuffer 'enable' set
To setup the default 'enable' setting the "dev_set_param(dev, "enable", "0");"
does not work as expected. After the call the parameter is still "<NULL>".
This is due to any change of the setting is rejected, if the same setting
is already active.
This patch also let the default setting be successfull, but only calls the
graphics backend if a change happens.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c index ab2c5eb2f6..bef41470cb 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -39,14 +39,13 @@ static int fb_enable_set(struct device_d *dev, struct param_d *param, enable = simple_strtoul(val, NULL, 0); - if (info->enabled == !!enable) - return 0; - if (enable) { - info->fbops->fb_enable(info); + if (!info->enabled) + info->fbops->fb_enable(info); new = "1"; } else { - info->fbops->fb_disable(info); + if (info->enabled) + info->fbops->fb_disable(info); new = "0"; } |