Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4237081e573b99a48991aa71364b0682c444651c
Commit:     4237081e573b99a48991aa71364b0682c444651c
Parent:     fdc9c566161c119febe4fab0f7c382416681fd8f
Author:     Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 20 01:33:39 2007 +0100
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Thu Mar 1 09:52:40 2007 +0100

    HID: fix bug in zeroing the last field byte in output reports
    
    d4ae650a904612ffb7edd3f28b69b022988d2466 introduced zeroing of the
    last field byte in output reports in order to make sure the unused
    bits are set to 0. This is done in a wrong way, resulting in a
    wrong bits being zeroed out (not properly shifted by the field offset
    in the report). Fix this.
    
    Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/hid-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 7452399..aeeb679 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -880,7 +880,7 @@ static void hid_output_field(struct hid_field *field, __u8 
*data)
 
        /* make sure the unused bits in the last byte are zeros */
        if (count > 0 && size > 0)
-               data[(count*size-1)/8] = 0;
+               data[(offset+count*size-1)/8] = 0;
 
        for (n = 0; n < count; n++) {
                if (field->logical_minimum < 0) /* signed values */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to