diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-15 15:55:55 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 16:16:21 +0300 |
commit | e3a26aecc0ea5ce1c2bd567439d66a0699ea7774 (patch) | |
tree | 96349d8e5473f76232f578e665f336ce5173b3cf /drivers/video/omap2/dss/overlay.c | |
parent | f6dc815098bde08c09fd1219e0f77663f8a9a6c7 (diff) | |
download | op-kernel-dev-e3a26aecc0ea5ce1c2bd567439d66a0699ea7774.zip op-kernel-dev-e3a26aecc0ea5ce1c2bd567439d66a0699ea7774.tar.gz |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c index 62691d0..afb7583 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) |