upstream: [media] rc: img-ir: hw: Fix min/max bits setup
authorJames Hogan <james.hogan@imgtec.com>
Thu, 13 Mar 2014 10:29:22 +0000 (07:29 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:58:50 +0000 (11:58 +0900)
commit2cc91d9586b7898157170985381b8c28bfbf4496
tree3454f2c958e257fa4e621dbbe82d14d7d562dd7c
parent2016ff41df42ea00f8e21dc741a8fff3a089acb7
upstream: [media] rc: img-ir: hw: Fix min/max bits setup

The calculated values for the minlen and maxlen fields, which were
rounded to multiples of 2 and clamped to a valid range, were left
unused. Use them in the calculation of the register value rather than
using the raw input minlen and maxlen.

This fixes the following warning with a W=1 build:
drivers/media/rc/img-ir/img-ir-hw.c In function ‘img_ir_free_timing’:
drivers/media/rc/img-ir/img-ir-hw.c +228 :23: warning: variable ‘maxlen’ set but not used [-Wunused-but-set-variable]
drivers/media/rc/img-ir/img-ir-hw.c +228 :15: warning: variable ‘minlen’ set but not used [-Wunused-but-set-variable]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/rc/img-ir/img-ir-hw.c