9
0
Fork 0

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>
This commit is contained in:
Juergen Beisert 2010-12-20 16:05:04 +01:00 committed by Sascha Hauer
parent 11c523d784
commit fed63e249d
1 changed files with 4 additions and 5 deletions

View File

@ -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";
}