diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-22 16:26:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-24 11:37:40 +0200 |
commit | 112d65d3d2bde37529e61d6ad3011c39a1f65589 (patch) | |
tree | d36d4d67411a1902663cb0f3cec293783628a537 /drivers | |
parent | f2f02d5ba93eb38c0ce1f1eca8824b0bbd1148c6 (diff) | |
download | barebox-112d65d3d2bde37529e61d6ad3011c39a1f65589.tar.gz barebox-112d65d3d2bde37529e61d6ad3011c39a1f65589.tar.xz |
fb: add a usage counter to prevent double enable/disable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/fb.c b/drivers/video/fb.c index 841c3afe9e..f9a425efac 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -39,6 +39,9 @@ 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); new = "1"; @@ -49,6 +52,8 @@ static int fb_enable_set(struct device_d *dev, struct param_d *param, dev_param_set_generic(dev, param, new); + info->enabled = !!enable; + return 0; } |