]> git.baikalelectronics.ru Git - kernel.git/commit
USB: Fix a bug on appledisplay.c regarding signedness
authorpancho horrillo <pancho@pancho.name>
Wed, 23 Dec 2009 10:09:13 +0000 (11:09 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Dec 2009 19:34:20 +0000 (11:34 -0800)
commita7e8f7644a9ba3ce4d13666326cba71bc0075093
treeec426c51304b2d70f8c981e72faed37a14ad3818
parent009d6a37bcaf5f7b4eb3a7c8114a3ee0e3bad0f5
USB: Fix a bug on appledisplay.c regarding signedness

brightness status is reported by the Apple Cinema Displays as an
'unsigned char' (u8) value, but the code used 'char' instead.

Note that he driver was developed on the PowerPC architecture,
where the two types are synonymous, which is not always the case.

Fixed that.  Otherwise the driver will interpret brightness
levels > 127 as negative, and fail to load.

Signed-off-by: pancho horrillo <pancho@pancho.name>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/appledisplay.c