From patchwork Fri Oct 9 13:46:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 7361941 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5134BEEA4 for ; Fri, 9 Oct 2015 13:51:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04DE9205D8 for ; Fri, 9 Oct 2015 13:51:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00A3B20765 for ; Fri, 9 Oct 2015 13:51:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757407AbbJINvK (ORCPT ); Fri, 9 Oct 2015 09:51:10 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:34553 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752884AbbJINvI (ORCPT ); Fri, 9 Oct 2015 09:51:08 -0400 Received: by qgez77 with SMTP id z77so69150129qge.1 for ; Fri, 09 Oct 2015 06:51:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LFC7XufPg++ix7rV/HCbSee3mKoS5IAGr8V+/6e5U50=; b=kP/t3i7g8pBXeYYZOAq9HpNGp4gbycXIUNg2fQxLPoiKpH9SKZQNuztAxqzSQUF60m TCQrkw6vJxkaiPxqXR2tV2icWXhx8dQD6sgxCbfXJUDTL7MZuYkHbGYB2N3+CZn0+zDP bsfv5cBkBH420zh/VPAEVfW61S67cL/j76Xym1OFwFfVH7xPsw8fpDbH13pFwi/nigh6 YcfNmDMOw8Qph1sO6jdI1DslNHk0EGLw0UAf/4d4eCBKQzZlbDGGwVuDs5tzr8t01TrI WopkGWDemG7IrUNms1hV1yyBW8KcIKKth+KjJCOXSQAvsQCTYxs52hpnNwih8ptuEaeZ vqtQ== X-Gm-Message-State: ALoCoQn4KjKWy63A7VTGYV0yaqQ4TQUd0jtzsZqhxrA9LcbP35qSdBPUfm1m4DQNW9079xmaswQR X-Received: by 10.140.101.119 with SMTP id t110mr15873486qge.71.1444398667824; Fri, 09 Oct 2015 06:51:07 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by smtp.gmail.com with ESMTPSA id q75sm679167qki.3.2015.10.09.06.51.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Oct 2015 06:51:07 -0700 (PDT) From: Ezequiel Garcia To: , Cc: Dmitry Torokhov , Daniel Mack , Sascha Hauer , mark.rutland@arm.com, robh+dt@kernel.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, ariel@vanguardiasur.com.ar, Ben Gamari Subject: [PATCH 1/3] input: rotary-encoder: Use of_property_read_bool Date: Fri, 9 Oct 2015 10:46:54 -0300 Message-Id: <1444398416-3073-2-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1444398416-3073-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1444398416-3073-1-git-send-email-ezequiel@vanguardiasur.com.ar> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Gamari This commit makes uses of_property_read_bool() to read boolean properties. This is just cosmetic cleanup. Signed-off-by: Ben Gamari --- drivers/input/misc/rotary_encoder.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index f27f81ee84ed..15a4cc670a3f 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -174,12 +174,9 @@ static struct rotary_encoder_platform_data *rotary_encoder_parse_dt(struct devic pdata->gpio_b = of_get_gpio_flags(np, 1, &flags); pdata->inverted_b = flags & OF_GPIO_ACTIVE_LOW; - pdata->relative_axis = !!of_get_property(np, - "rotary-encoder,relative-axis", NULL); - pdata->rollover = !!of_get_property(np, - "rotary-encoder,rollover", NULL); - pdata->half_period = !!of_get_property(np, - "rotary-encoder,half-period", NULL); + pdata->relative_axis = of_property_read_bool(np, "rotary-encoder,relative-axis"); + pdata->rollover = of_property_read_bool(np, "rotary-encoder,rollover"); + pdata->half_period = of_property_read_bool(np, "rotary-encoder,half-period"); return pdata; }