Commit 895507c1 authored by Paul Bolle's avatar Paul Bolle Committed by Mauro Carvalho Chehab

[media] staging: lirc_serial: silence GCC warning

Building lirc_serial.o triggers this GCC warning:
    drivers/staging/media/lirc/lirc_serial.c: In function '__check_sense':
    drivers/staging/media/lirc/lirc_serial.c:1301:1: warning: return from incompatible pointer type [enabled by default]
This can be trivially fixed by changing the 'sense' parameter from bool
to int. But, to be safe, we also need to make sure 'sense' will only be
-1, 0, or 1. There's no need to document the new values that are now
allowed for the 'sense' parameter, since they're basically useless.
Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0dec8688
...@@ -1239,6 +1239,10 @@ static int __init lirc_serial_init_module(void) ...@@ -1239,6 +1239,10 @@ static int __init lirc_serial_init_module(void)
} }
} }
/* make sure sense is either -1, 0, or 1 */
if (sense != -1)
sense = !!sense;
result = lirc_serial_init(); result = lirc_serial_init();
if (result) if (result)
return result; return result;
...@@ -1298,7 +1302,7 @@ MODULE_PARM_DESC(irq, "Interrupt (4 or 3)"); ...@@ -1298,7 +1302,7 @@ MODULE_PARM_DESC(irq, "Interrupt (4 or 3)");
module_param(share_irq, bool, S_IRUGO); module_param(share_irq, bool, S_IRUGO);
MODULE_PARM_DESC(share_irq, "Share interrupts (0 = off, 1 = on)"); MODULE_PARM_DESC(share_irq, "Share interrupts (0 = off, 1 = on)");
module_param(sense, bool, S_IRUGO); module_param(sense, int, S_IRUGO);
MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit"
" (0 = active high, 1 = active low )"); " (0 = active high, 1 = active low )");
......
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