linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Walmsley <paul@booyaka.com>
To: linux-input@atrey.karlin.mff.cuni.cz
Subject: [PATCH 1/7] usbhid: specify explicit size for hid_blacklist.quirks
Date: Sun, 18 Mar 2007 22:21:46 -0600 (MDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703182037050.21893@utopia.booyaka.com> (raw)


From: Paul Walmsley <paul@booyaka.com>

Explicitly specify the size of the hid_blacklist quirks member, to guard
against surprises on architectures where unsigned ints aren't 32 bits long.

Signed-off-by: Paul Walmsley <paul@booyaka.com>

---
  dev/drivers/usb/input/hid-core.c |    5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux/dev/drivers/usb/input/hid-core.c
===================================================================
--- linux.orig/dev/drivers/usb/input/hid-core.c
+++ linux/dev/drivers/usb/input/hid-core.c
@@ -772,7 +772,7 @@ void usbhid_init_reports(struct hid_devi
  static const struct hid_blacklist {
  	__u16 idVendor;
  	__u16 idProduct;
-	unsigned quirks;
+	__u32 quirks;
  } hid_blacklist[] = {

  	{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES },
@@ -1059,7 +1059,8 @@ static struct hid_device *usb_hid_config
  	struct usb_device *dev = interface_to_usbdev (intf);
  	struct hid_descriptor *hdesc;
  	struct hid_device *hid;
-	unsigned quirks = 0, rsize = 0;
+	__u32 quirks = 0;
+	unsigned rsize = 0;
  	char *rdesc;
  	int n, len, insize = 0;
  	struct usbhid_device *usbhid;

                 reply	other threads:[~2007-03-19  4:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0703182037050.21893@utopia.booyaka.com \
    --to=paul@booyaka.com \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).