Skip to content

Commit

Permalink
OMAP: OMAPFB: string parsing cleanups
Browse files Browse the repository at this point in the history
Use strtobool instead of kstrtoint when parsing bool from sysfs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Sep 30, 2011
1 parent e3a26ae commit 7fbf1bb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/video/omap2/omapfb/omapfb-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7fbf1bb

Please sign in to comment.