[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>
This commit is contained in:
James Hogan 2014-03-13 07:29:22 -03:00 committed by Mauro Carvalho Chehab
parent 32df34d875
commit b9e28d1f83
1 changed files with 3 additions and 3 deletions

View File

@ -240,9 +240,9 @@ static u32 img_ir_free_timing(const struct img_ir_free_timing *timing,
ft_min = (timing->ft_min*clock_hz + 999999) / 1000000;
ft_min = (ft_min + 7) >> 3;
/* construct register value */
return (timing->maxlen << IMG_IR_MAXLEN_SHIFT) |
(timing->minlen << IMG_IR_MINLEN_SHIFT) |
(ft_min << IMG_IR_FT_MIN_SHIFT);
return (maxlen << IMG_IR_MAXLEN_SHIFT) |
(minlen << IMG_IR_MINLEN_SHIFT) |
(ft_min << IMG_IR_FT_MIN_SHIFT);
}
/**