Commit 825f50b1 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Tomi Valkeinen

OMAP: DSS2: Check if display supports update mode changes

Check whether the display actually has the set_update_mode() function
before calling it. Only the sysfs codepath was broken, the omapfb ioctl
had the necessary protection.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@nokia.com>
parent 5ab8e30c
...@@ -82,6 +82,9 @@ static ssize_t display_upd_mode_store(struct device *dev, ...@@ -82,6 +82,9 @@ static ssize_t display_upd_mode_store(struct device *dev,
int val, r; int val, r;
enum omap_dss_update_mode mode; enum omap_dss_update_mode mode;
if (!dssdev->driver->set_update_mode)
return -EINVAL;
val = simple_strtoul(buf, NULL, 10); val = simple_strtoul(buf, NULL, 10);
switch (val) { switch (val) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment