From patchwork Tue Apr 5 10:08:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RGF2aWQgSMODwqRyZGVtYW4=?= X-Patchwork-Id: 686431 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p35A9IWC003627 for ; Tue, 5 Apr 2011 10:09:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743Ab1DEKJR (ORCPT ); Tue, 5 Apr 2011 06:09:17 -0400 Received: from 1-1-12-13a.han.sth.bostream.se ([82.182.30.168]:49724 "EHLO palpatine.hardeman.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141Ab1DEKJQ (ORCPT ); Tue, 5 Apr 2011 06:09:16 -0400 Received: from felix.hardeman.nu (unknown [46.115.20.116]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by palpatine.hardeman.nu (Postfix) with ESMTPSA id 6DE97C74; Tue, 5 Apr 2011 12:09:12 +0200 (CEST) Received: by felix.hardeman.nu (Postfix, from userid 1000) id 248B24011A; Tue, 5 Apr 2011 12:08:27 +0200 (CEST) Subject: [PATCH] rc-core: int to bool conversion for winbond-cir To: linux-media@vger.kernel.org From: David =?utf-8?b?SMOkcmRlbWFu?= Cc: mchehab@redhat.com, skandalfo@gmail.com Date: Tue, 05 Apr 2011 12:08:27 +0200 Message-ID: <20110405100827.5202.52169.stgit@felix.hardeman.nu> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Apr 2011 10:09:28 +0000 (UTC) Using bool instead of an int helps readability a bit. Signed-off-by: David Härdeman --- drivers/media/rc/winbond-cir.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index b0a5fdc..cdb5ef4 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -382,7 +382,7 @@ wbcir_shutdown(struct pnp_dev *device) { struct device *dev = &device->dev; struct wbcir_data *data = pnp_get_drvdata(device); - int do_wake = 1; + bool do_wake = true; u8 match[11]; u8 mask[11]; u8 rc6_csl = 0; @@ -392,14 +392,14 @@ wbcir_shutdown(struct pnp_dev *device) memset(mask, 0, sizeof(mask)); if (wake_sc == INVALID_SCANCODE || !device_may_wakeup(dev)) { - do_wake = 0; + do_wake = false; goto finish; } switch (protocol) { case IR_PROTOCOL_RC5: if (wake_sc > 0xFFF) { - do_wake = 0; + do_wake = false; dev_err(dev, "RC5 - Invalid wake scancode\n"); break; } @@ -418,7 +418,7 @@ wbcir_shutdown(struct pnp_dev *device) case IR_PROTOCOL_NEC: if (wake_sc > 0xFFFFFF) { - do_wake = 0; + do_wake = false; dev_err(dev, "NEC - Invalid wake scancode\n"); break; } @@ -440,7 +440,7 @@ wbcir_shutdown(struct pnp_dev *device) if (wake_rc6mode == 0) { if (wake_sc > 0xFFFF) { - do_wake = 0; + do_wake = false; dev_err(dev, "RC6 - Invalid wake scancode\n"); break; } @@ -496,7 +496,7 @@ wbcir_shutdown(struct pnp_dev *device) } else if (wake_sc <= 0x007FFFFF) { rc6_csl = 60; } else { - do_wake = 0; + do_wake = false; dev_err(dev, "RC6 - Invalid wake scancode\n"); break; } @@ -508,14 +508,14 @@ wbcir_shutdown(struct pnp_dev *device) mask[i++] = 0x0F; } else { - do_wake = 0; + do_wake = false; dev_err(dev, "RC6 - Invalid wake mode\n"); } break; default: - do_wake = 0; + do_wake = false; break; }