OMAP: OMAPFB: string parsing cleanups
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 15 Aug 2011 12:56:54 +0000 (15:56 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Sep 2011 13:16:22 +0000 (16:16 +0300)
Use strtobool instead of kstrtoint when parsing bool from sysfs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/omapfb/omapfb-sysfs.c

index 153bf1aceebcc3248051e5c29c80fc4548e6bf50..1694d5148f323fad66a03fe45f4054f4f7a4a09e 100644 (file)
@@ -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;