aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-08-15 15:56:54 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 16:16:22 +0300
commit7fbf1bb02d1005203e39ca7bd7aa7afcd2909c4b (patch)
tree1df2f6024bbe63ec1264a98a1f4331e13a08d34a /drivers
parente3a26aecc0ea5ce1c2bd567439d66a0699ea7774 (diff)
OMAP: OMAPFB: string parsing cleanups
Use strtobool instead of kstrtoint when parsing bool from sysfs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-sysfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c
index 153bf1aceebc..1694d5148f32 100644
--- a/drivers/video/omap2/omapfb/omapfb-sysfs.c
+++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c
@@ -104,16 +104,14 @@ static ssize_t store_mirror(struct device *dev,
{
struct fb_info *fbi = dev_get_drvdata(dev);
struct omapfb_info *ofbi = FB2OFB(fbi);
- int mirror;
+ bool mirror;
int r;
struct fb_var_screeninfo new_var;
- r = kstrtoint(buf, 0, &mirror);
+ r = strtobool(buf, &mirror);
if (r)
return r;
- mirror = !!mirror;
-
if (!lock_fb_info(fbi))
return -ENODEV;

Privacy Policy