summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/overlay.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-15 16:55:55 +0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 17:16:21 +0400
commite3a26aecc0ea5ce1c2bd567439d66a0699ea7774 (patch)
tree96349d8e5473f76232f578e665f336ce5173b3cf /drivers/video/omap2/dss/overlay.c
parentf6dc815098bde08c09fd1219e0f77663f8a9a6c7 (diff)
downloadlinux-e3a26aecc0ea5ce1c2bd567439d66a0699ea7774.tar.xz
OMAP: DSS2: string parsing cleanups
Use strtobool and kstrto* functions when parsing sysfs inputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/overlay.c')
-rw-r--r--drivers/video/omap2/dss/overlay.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index 62691d0a8aae..afb75839a328 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -211,16 +211,17 @@ static ssize_t overlay_enabled_show(struct omap_overlay *ovl, char *buf)
static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf,
size_t size)
{
- int r, enable;
+ int r;
+ bool enable;
struct omap_overlay_info info;
ovl->get_overlay_info(ovl, &info);
- r = kstrtoint(buf, 0, &enable);
+ r = strtobool(buf, &enable);
if (r)
return r;
- info.enabled = !!enable;
+ info.enabled = enable;
r = ovl->set_overlay_info(ovl, &info);
if (r)