diff options
author | Ville Syrjälä <ville.syrjala@nokia.com> | 2010-03-02 14:30:52 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-08-03 08:18:45 -0400 |
commit | 825f50b1a498f6e3532c8fcbc093322bb386f9e1 (patch) | |
tree | 0e5b7933363c3cfa7594654849d1cb373f7cf4bc /drivers/video/omap2/dss/display.c | |
parent | 5ab8e30c18292cf30de3adc36b0e2ed9d271e4e7 (diff) |
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: Ville Syrjälä <ville.syrjala@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/dss/display.c')
-rw-r--r-- | drivers/video/omap2/dss/display.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index ef8c8529dda2..480aeaa5f39c 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c | |||
@@ -82,6 +82,9 @@ static ssize_t display_upd_mode_store(struct device *dev, | |||
82 | int val, r; | 82 | int val, r; |
83 | enum omap_dss_update_mode mode; | 83 | enum omap_dss_update_mode mode; |
84 | 84 | ||
85 | if (!dssdev->driver->set_update_mode) | ||
86 | return -EINVAL; | ||
87 | |||
85 | val = simple_strtoul(buf, NULL, 10); | 88 | val = simple_strtoul(buf, NULL, 10); |
86 | 89 | ||
87 | switch (val) { | 90 | switch (val) { |