aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpancho horrillo <pancho@pancho.name>2009-12-23 05:09:13 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-23 14:34:20 -0500
commit37e9066b2f85480d99d3795373f5ef0b00ac1189 (patch)
treeec426c51304b2d70f8c981e72faed37a14ad3818
parentc983202bd03eb82394ef1dce5906702fcbc7bb80 (diff)
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>
-rw-r--r--drivers/usb/misc/appledisplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index 8dc4afa38b87..1eb9e4162cc6 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -73,8 +73,8 @@ struct appledisplay {
73 struct usb_device *udev; /* usb device */ 73 struct usb_device *udev; /* usb device */
74 struct urb *urb; /* usb request block */ 74 struct urb *urb; /* usb request block */
75 struct backlight_device *bd; /* backlight device */ 75 struct backlight_device *bd; /* backlight device */
76 char *urbdata; /* interrupt URB data buffer */ 76 u8 *urbdata; /* interrupt URB data buffer */
77 char *msgdata; /* control message data buffer */ 77 u8 *msgdata; /* control message data buffer */
78 78
79 struct delayed_work work; 79 struct delayed_work work;
80 int button_pressed; 80 int button_pressed;