atmel_lcdfb: validate display timings
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 6 Feb 2008 09:39:11 +0000 (01:39 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 6 Feb 2008 18:41:15 +0000 (10:41 -0800)
commit162b3a084904a1d6ef1553782b8573885d5f900b
treed525a8f16852d80175555d3e28c52fb1f7d98bc0
parent529e55b6a57bda6df9e45eb268589efc70f63303
atmel_lcdfb: validate display timings

Setting a display timing parameter too high or too low may cause it to
wrap around and thus become completely wrong. Validate the timings in
atmel_lcdfb_check_var() and saturate to the highest or lowest possible
value if necessary.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/atmel_lcdfb.c
include/video/atmel_lcdc.h