From: Scott Valentine Date: Wed, 11 Nov 2009 22:26:49 +0000 (-0800) Subject: rtc: v3020: fix v3020_mmio_read_bit() X-Git-Tag: v2.6.32-rc7~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcb3a1676b87effbdeffe8da5c44f63433d158d9;p=pandora-kernel.git 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 Cc: Paul Gortmaker Cc: Raphael Assenat Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed