From 7fbf1bb02d1005203e39ca7bd7aa7afcd2909c4b Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 15 Aug 2011 15:56:54 +0300 Subject: [PATCH] OMAP: OMAPFB: string parsing cleanups Use strtobool instead of kstrtoint when parsing bool from sysfs. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/omapfb/omapfb-sysfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c index 153bf1aceeb..1694d5148f3 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; -- 2.39.5