diff mbox

[2/4] DSS2: Check if display supports update mode changes

Message ID 1267795582-21004-2-git-send-email-ville.syrjala@nokia.com
State New, archived
Delegated to: Tomi Valkeinen
Headers show

Commit Message

ville.syrjala@nokia.com March 5, 2010, 1:26 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c
index 6a74ea1..3a8f146 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,
 	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) {