Commit f3a9d7ef authored by Heba Aamer's avatar Heba Aamer Committed by Mauro Carvalho Chehab

[media] staging: lirc_serial: adjust boolean assignments

Adjusts boolean assignments from 0/1 to false/true.

And accordingly, it also adjusts the if conditions.
Signed-off-by: default avatarHeba Aamer <heba93aamer@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2948c01c
...@@ -107,7 +107,7 @@ static int io; ...@@ -107,7 +107,7 @@ static int io;
static int irq; static int irq;
static bool iommap; static bool iommap;
static int ioshift; static int ioshift;
static bool softcarrier = 1; static bool softcarrier = true;
static bool share_irq; static bool share_irq;
static bool debug; static bool debug;
static int sense = -1; /* -1 = auto, 0 = active high, 1 = active low */ static int sense = -1; /* -1 = auto, 0 = active high, 1 = active low */
...@@ -266,7 +266,7 @@ static unsigned long space_width; ...@@ -266,7 +266,7 @@ static unsigned long space_width;
/* fetch serial input packet (1 byte) from register offset */ /* fetch serial input packet (1 byte) from register offset */
static u8 sinp(int offset) static u8 sinp(int offset)
{ {
if (iommap != 0) if (iommap)
/* the register is memory-mapped */ /* the register is memory-mapped */
offset <<= ioshift; offset <<= ioshift;
...@@ -276,7 +276,7 @@ static u8 sinp(int offset) ...@@ -276,7 +276,7 @@ static u8 sinp(int offset)
/* write serial output packet (1 byte) of value to register offset */ /* write serial output packet (1 byte) of value to register offset */
static void soutp(int offset, u8 value) static void soutp(int offset, u8 value)
{ {
if (iommap != 0) if (iommap)
/* the register is memory-mapped */ /* the register is memory-mapped */
offset <<= ioshift; offset <<= ioshift;
...@@ -799,10 +799,10 @@ static int lirc_serial_probe(struct platform_device *dev) ...@@ -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 memory mapped I/O you *might* need to use ioremap() first,
* for the NSLU2 it's done in boot code. * for the NSLU2 it's done in boot code.
*/ */
if (((iommap != 0) if (((iommap)
&& (devm_request_mem_region(&dev->dev, iommap, 8 << ioshift, && (devm_request_mem_region(&dev->dev, iommap, 8 << ioshift,
LIRC_DRIVER_NAME) == NULL)) LIRC_DRIVER_NAME) == NULL))
|| ((iommap == 0) || ((!iommap)
&& (devm_request_region(&dev->dev, io, 8, && (devm_request_region(&dev->dev, io, 8,
LIRC_DRIVER_NAME) == NULL))) { LIRC_DRIVER_NAME) == NULL))) {
dev_err(&dev->dev, "port %04x already in use\n", io); dev_err(&dev->dev, "port %04x already in use\n", io);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment