Scott Valentine bcb3a1676b rtc: v3020: fix v3020_mmio_read_bit()
v3020_mmio_read_bit() always returns 0 when left_shift > 7.

v3020_mmio_read_bit()'s return type is (unsigned char).  The code returns
a value masked by (1 << left_shift) that is casted to the return type.  If
left_shift is larger than 7, the cast will always result in a 0 return
value.  The problem was discovered with left_shift = 16, and the included
patch corrects the problem.

The bug was introduced in the last (Apr 3 2009) commit of the file, kernel
versions 2.6.30 and later.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Raphael Assenat <raph@8d.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-12 07:25:59 -08:00
..
2009-09-23 07:39:45 -07:00
2009-09-23 07:39:45 -07:00
2009-09-17 09:47:24 +02:00
2009-09-23 07:39:46 -07:00
2009-02-11 14:25:36 -08:00
2009-09-23 07:39:45 -07:00
2009-02-05 12:56:46 -08:00
2009-01-06 15:59:25 -08:00
2009-09-23 07:39:43 -07:00
2009-07-06 13:57:03 -07:00
2009-09-23 07:39:43 -07:00
2009-06-18 13:03:43 -07:00
2009-09-23 07:39:43 -07:00
2009-04-01 08:59:24 -07:00
2008-10-20 08:52:41 -07:00
2009-09-23 07:39:43 -07:00
2008-10-20 08:52:41 -07:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:45 -07:00
2009-04-02 01:05:32 +00:00
2009-09-23 07:39:43 -07:00
2009-09-23 07:39:43 -07:00
2008-11-21 01:24:38 -08:00
2008-11-14 16:37:54 -08:00
2009-06-18 13:03:43 -07:00
2009-11-12 07:25:58 -08:00
2009-04-01 08:59:26 -07:00
2008-10-20 08:52:41 -07:00