Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Paul Bolle <pebolle@tiscali.nl>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Paul Bolle and committed by
Mauro Carvalho Chehab
895507c1 0dec8688

+5 -1
+5 -1
drivers/staging/media/lirc/lirc_serial.c
··· 1239 1239 } 1240 1240 } 1241 1241 1242 + /* make sure sense is either -1, 0, or 1 */ 1243 + if (sense != -1) 1244 + sense = !!sense; 1245 + 1242 1246 result = lirc_serial_init(); 1243 1247 if (result) 1244 1248 return result; ··· 1302 1298 module_param(share_irq, bool, S_IRUGO); 1303 1299 MODULE_PARM_DESC(share_irq, "Share interrupts (0 = off, 1 = on)"); 1304 1300 1305 - module_param(sense, bool, S_IRUGO); 1301 + module_param(sense, int, S_IRUGO); 1306 1302 MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" 1307 1303 " (0 = active high, 1 = active low )"); 1308 1304