Commit 37e9066b authored by pancho horrillo's avatar pancho horrillo Committed by Greg Kroah-Hartman

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: default avatarpancho horrillo <pancho@pancho.name>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c983202b
...@@ -73,8 +73,8 @@ struct appledisplay { ...@@ -73,8 +73,8 @@ struct appledisplay {
struct usb_device *udev; /* usb device */ struct usb_device *udev; /* usb device */
struct urb *urb; /* usb request block */ struct urb *urb; /* usb request block */
struct backlight_device *bd; /* backlight device */ struct backlight_device *bd; /* backlight device */
char *urbdata; /* interrupt URB data buffer */ u8 *urbdata; /* interrupt URB data buffer */
char *msgdata; /* control message data buffer */ u8 *msgdata; /* control message data buffer */
struct delayed_work work; struct delayed_work work;
int button_pressed; int button_pressed;
......
Markdown is supported
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