Am Freitag, 26. Mai 2006 11:15 schrieb Michael Hanselmann:
> +static int appledisplay_bl_update_status(struct backlight_device *bd)
> +{
> + struct appledisplay *pdata = class_get_devdata(&bd->class_dev);
> + char buffer[2];
> + int retval;
> +
> + buffer[0] = 0x10;
> + buffer[1] = bd->props->brightness;
> +
> + retval = usb_control_msg(
> + pdata->udev,
> + usb_sndctrlpipe(pdata->udev, 0),
> + USB_REQ_SET_REPORT,
> + USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
> + ACD_USB_BRIGHTNESS,
> + 0,
> + buffer,
> + sizeof(buffer),
> + 250);
> +
> + return retval;
> +}
DMA on the stack. You must not do this. Allocate the buffer with kmalloc.
Regards
Oliver
Ym
潩íj¬¡òâìLjv yÑè²Ø§h¶¢ËZÔb²An\¨§yÛ^râr&§±8^(!zËgºfÞ®ÑyÑڵǫ¶'âq«b¢{"Ø^-x"Û¬¶¼
jvÆ¥Jêi¢»B'$¶^j¹æ¢·¡¶ÚþÇ¥jˬ}©dj
Þ·ûÉ