From: pancho horrillo Date: Wed, 23 Dec 2009 10:09:13 +0000 (+0100) Subject: USB: Fix a bug on appledisplay.c regarding signedness X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37e9066b2f85480d99d3795373f5ef0b00ac1189;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: stable Signed-off-by: Greg Kroah-Hartman --- 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 { 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;