LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Heba Aamer <heba93aamer@gmail.com>
To: devel@driverdev.osuosl.org
Cc: jarod@wilsonet.com, mchehab@osg.samsung.com,
gregkh@linuxfoundation.org, tapaswenipathak@gmail.com,
tuomas.tynkkynen@iki.fi, dan.carpenter@oracle.com,
gulsah.1004@gmail.com, himangi774@gmail.com, pebolle@tiscali.nl,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: media: lirc: adjust boolean assignments
Date: Mon, 26 Jan 2015 15:21:09 +0200 [thread overview]
Message-ID: <20150126132109.GA16448@mohammed-Inspiron-3537> (raw)
This patch adjusts boolean assignments from 0/1 to false/true.
And accordingly, it also adjusts the if conditions.
Signed-off-by: Heba Aamer <heba93aamer@gmail.com>
---
drivers/staging/media/lirc/lirc_serial.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c
index eb4ccb8..19628d0 100644
--- a/drivers/staging/media/lirc/lirc_serial.c
+++ b/drivers/staging/media/lirc/lirc_serial.c
@@ -107,7 +107,7 @@ static int io;
static int irq;
static bool iommap;
static int ioshift;
-static bool softcarrier = 1;
+static bool softcarrier = true;
static bool share_irq;
static bool debug;
static int sense = -1; /* -1 = auto, 0 = active high, 1 = active low */
@@ -266,7 +266,7 @@ static unsigned long space_width;
/* fetch serial input packet (1 byte) from register offset */
static u8 sinp(int offset)
{
- if (iommap != 0)
+ if (iommap)
/* the register is memory-mapped */
offset <<= ioshift;
@@ -276,7 +276,7 @@ static u8 sinp(int offset)
/* write serial output packet (1 byte) of value to register offset */
static void soutp(int offset, u8 value)
{
- if (iommap != 0)
+ if (iommap)
/* the register is memory-mapped */
offset <<= ioshift;
@@ -799,10 +799,10 @@ static int lirc_serial_probe(struct platform_device *dev)
* For memory mapped I/O you *might* need to use ioremap() first,
* for the NSLU2 it's done in boot code.
*/
- if (((iommap != 0)
+ if (((iommap)
&& (devm_request_mem_region(&dev->dev, iommap, 8 << ioshift,
LIRC_DRIVER_NAME) == NULL))
- || ((iommap == 0)
+ || ((!iommap)
&& (devm_request_region(&dev->dev, io, 8,
LIRC_DRIVER_NAME) == NULL))) {
dev_err(&dev->dev, "port %04x already in use\n", io);
--
1.7.9.5
reply other threads:[~2015-01-26 13:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150126132109.GA16448@mohammed-Inspiron-3537 \
--to=heba93aamer@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=gulsah.1004@gmail.com \
--cc=himangi774@gmail.com \
--cc=jarod@wilsonet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=pebolle@tiscali.nl \
--cc=tapaswenipathak@gmail.com \
--cc=tuomas.tynkkynen@iki.fi \
--subject='Re: [PATCH] staging: media: lirc: adjust boolean assignments' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).