On Mon, May 17, 2004 at 04:03:20PM +0400, Sergey Vlasov wrote: > On Sun, May 16, 2004 at 02:58:03PM -0700, Greg KH wrote: > > Ick, does hiddev really need hid.h? If so, then we need to move it to > > include/linux/. > > How about this patch (applies both to 2.4 and 2.6)?
<snip> > +#define HID_MAX_MULTI_USAGES 1024 > struct hiddev_usage_ref_multi { > struct hiddev_usage_ref uref; > __u32 num_values; > - __s32 values[HID_MAX_USAGES]; > + __s32 values[HID_MAX_MULTI_USAGES]; > }; That certainly beats redefining the ioctls, although it probably wants the bit below as well. I'll make a rollup patch if this is the direction we want to go. --Adam --- linux-2.6.6/drivers/usb/input/hiddev.c Wed May 12 11:52:25 2004 +++ linux-2.6.6-adk/drivers/usb/input/hiddev.c Mon May 17 09:21:16 2004 @@ -642,7 +642,7 @@ goto inval; if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) { - if (uref_multi->num_values >= HID_MAX_USAGES || + if (uref_multi->num_values >= HID_MAX_MULTI_USAGES || uref->usage_index >= field->maxusage || (uref->usage_index + uref_multi->num_values) >= field->maxusage) goto inval; ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel