From: Jarod Wilson Date: Fri, 27 May 2011 18:46:19 +0000 (-0300) Subject: [media] [staging] lirc_sir: fix unused-but-set warnings X-Git-Tag: firefly_0821_release~3680^2~5044^2~63 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=04f561ff8714c89733dcf1d178b64d100d5a084a;p=firefly-linux-kernel-4.4.55.git [media] [staging] lirc_sir: fix unused-but-set warnings Signed-off-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/lirc/lirc_sir.c b/drivers/staging/lirc/lirc_sir.c index a7b46f24f24e..0d3864594b12 100644 --- a/drivers/staging/lirc/lirc_sir.c +++ b/drivers/staging/lirc/lirc_sir.c @@ -739,23 +739,16 @@ static void send_space(unsigned long len) static void send_pulse(unsigned long len) { long bytes_out = len / TIME_CONST; - long time_left; - time_left = (long)len - (long)bytes_out * (long)TIME_CONST; - if (bytes_out == 0) { + if (bytes_out == 0) bytes_out++; - time_left = 0; - } + while (bytes_out--) { outb(PULSE, io + UART_TX); /* FIXME treba seriozne cakanie z char/serial.c */ while (!(inb(io + UART_LSR) & UART_LSR_THRE)) ; } -#if 0 - if (time_left > 0) - safe_udelay(time_left); -#endif } #endif