Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 79ec7f56 authored by pancho horrillo's avatar pancho horrillo Committed by Greg Kroah-Hartman
Browse files

USB: Fix a bug on appledisplay.c regarding signedness

commit 37e9066b

 upstream.

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: default avatarpancho horrillo <pancho@pancho.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 61a6c8ed
No related merge requests found
......@@ -72,8 +72,8 @@ struct appledisplay {
struct usb_device *udev; /* usb device */
struct urb *urb; /* usb request block */
struct backlight_device *bd; /* backlight device */
char *urbdata; /* interrupt URB data buffer */
char *msgdata; /* control message data buffer */
u8 *urbdata; /* interrupt URB data buffer */
u8 *msgdata; /* control message data buffer */
struct delayed_work work;
int button_pressed;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment