From patchwork Mon Aug 22 08:27:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1084732 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7M8SLG9016587 for ; Mon, 22 Aug 2011 08:28:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756714Ab1HVI2U (ORCPT ); Mon, 22 Aug 2011 04:28:20 -0400 Received: from na3sys009aog123.obsmtp.com ([74.125.149.149]:33234 "EHLO na3sys009aog123.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756693Ab1HVI2S (ORCPT ); Mon, 22 Aug 2011 04:28:18 -0400 Received: from mail-bw0-f48.google.com ([209.85.214.48]) (using TLSv1) by na3sys009aob123.postini.com ([74.125.148.12]) with SMTP ID DSNKTlITHsks3vqEXNa/6yID5sgb97gPaOmp@postini.com; Mon, 22 Aug 2011 01:28:17 PDT Received: by mail-bw0-f48.google.com with SMTP id t2so3445293bka.7 for ; Mon, 22 Aug 2011 01:28:14 -0700 (PDT) Received: by 10.204.141.215 with SMTP id n23mr778480bku.364.1314001694599; Mon, 22 Aug 2011 01:28:14 -0700 (PDT) Received: from localhost.localdomain (a62-248-128-208.elisa-laajakaista.fi [62.248.128.208]) by mx.google.com with ESMTPS id n24sm1836215bkd.41.2011.08.22.01.28.12 (version=SSLv3 cipher=OTHER); Mon, 22 Aug 2011 01:28:13 -0700 (PDT) From: Tomi Valkeinen To: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Cc: Tomi Valkeinen Subject: [PATCH 06/10] OMAP: OMAPFB: string parsing cleanups Date: Mon, 22 Aug 2011 11:27:47 +0300 Message-Id: <1314001671-18123-7-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1314001671-18123-1-git-send-email-tomi.valkeinen@ti.com> References: <1314001671-18123-1-git-send-email-tomi.valkeinen@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 22 Aug 2011 08:28:21 +0000 (UTC) Use strtobool instead of kstrtoint when parsing bool from sysfs. Signed-off-by: Tomi Valkeinen --- 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 153bf1a..1694d51 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;