1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

OMAP: OMAPFB: string parsing cleanups

Use strtobool instead of kstrtoint when parsing bool from sysfs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
Tomi Valkeinen 2011-08-15 15:56:54 +03:00
parent e3a26aecc0
commit 7fbf1bb02d

View file

@ -104,16 +104,14 @@ static ssize_t store_mirror(struct device *dev,
{ {
struct fb_info *fbi = dev_get_drvdata(dev); struct fb_info *fbi = dev_get_drvdata(dev);
struct omapfb_info *ofbi = FB2OFB(fbi); struct omapfb_info *ofbi = FB2OFB(fbi);
int mirror; bool mirror;
int r; int r;
struct fb_var_screeninfo new_var; struct fb_var_screeninfo new_var;
r = kstrtoint(buf, 0, &mirror); r = strtobool(buf, &mirror);
if (r) if (r)
return r; return r;
mirror = !!mirror;
if (!lock_fb_info(fbi)) if (!lock_fb_info(fbi))
return -ENODEV; return -ENODEV;