tech-kern archive

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

ubt(4) fix in ignore list



Salut,

Please find appended a small fix for the ubt(4) driver. In the
ignorelist, it uses an element { 0, 0 } for no apparent reason which
makes it ignore devices with vendor and product ID 0. While this is
clearly a broken ID, we don't need to ignore the device.

If we look closer at the usb_lookup() macro which is used:

#define usb_lookup(tbl, vendor, product) \
        usb_match_device((const struct usb_devno *)(tbl), sizeof
(tbl) / sizeof ((tbl)[0]), sizeof ((tbl)[0]), (vendor), (product))

This macro uses sizeof to determine the size of the list and thus the
number of entries. This is of course good, but it means that entries
are also matched against 0, 0, which is not good.

Ok to commit?

                                Tonnerre

Attachment: ubt-dont-ignore-zero.diff
Description: Binary data

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index