Skip to content

Commit

Permalink
OMAP: DSS2: Check if display supports update mode changes
Browse files Browse the repository at this point in the history
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: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
  • Loading branch information
Ville Syrjälä authored and Tomi Valkeinen committed Aug 3, 2010
1 parent 5ab8e30 commit 825f50b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/video/omap2/dss/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ static ssize_t display_upd_mode_store(struct device *dev,
int val, r;
enum omap_dss_update_mode mode;

if (!dssdev->driver->set_update_mode)
return -EINVAL;

val = simple_strtoul(buf, NULL, 10);

switch (val) {
Expand Down

0 comments on commit 825f50b

Please sign in to comment.