diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-15 16:56:54 +0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 17:16:22 +0400 |
commit | 7fbf1bb02d1005203e39ca7bd7aa7afcd2909c4b (patch) | |
tree | 1df2f6024bbe63ec1264a98a1f4331e13a08d34a /drivers/video/omap2/omapfb | |
parent | e3a26aecc0ea5ce1c2bd567439d66a0699ea7774 (diff) | |
download | linux-7fbf1bb02d1005203e39ca7bd7aa7afcd2909c4b.tar.xz |
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/video/omap2/omapfb')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-sysfs.c | 6 |
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; |