Re: Zeroing the report before setting fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 5 Mar 2010, Dmitry Torokhov wrote:

> > the end of the byte. But in case of, say, my keyboard, NumLock is mask
> > 0x01 and CapsLock is 0x02. Invoking hid_output_field for NumLock
> > definitely zeroes across CapsLock. The only reason this works is that
> > the fields are sorted by the offset.
> > 
> > I am not sure it's safe at all times, so why don't we pull the
> > zeroing outside and do it once per report? Please see the attached.
> > I tested it with various keyboards (including those that blow up
> > on RHEL 5), and it works, but the question is, do we want it?
> > 
> 
> I think Jiri is the most qualified to answer questions like that about
> HID (CCed) buit I think what you are proposing is reasonable and would
> make the code safer indeed.

Yes, the patch looks fine to me, thanks for CCing me. 

Pete, could you please send it to me along with your Signed-off-by line, 
so that I could queue it up?

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux