lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 3 Jul 2007 08:07:46 +0200
From:	Oliver Neukum <oliver@...kum.org>
To:	Ondrej Zary <linux@...nbow-software.org>,
	linux-usb-devel@...ts.sourceforge.net
Cc:	daniel.ritz@....ch, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [resend] IRTOUCHSYSTEMS support for usbtouchscreen

Am Montag, 2. Juli 2007 schrieb Ondrej Zary:
> + * IRTOUCH Part
> + */
> +#ifdef CONFIG_TOUCHSCREEN_USB_IRTOUCH
> +static int irtouch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
> +{
> +       dev->x = (pkt[3] << 8) | pkt[2];
> +       dev->y = (pkt[5] << 8) | pkt[4];
> +       dev->touch = (pkt[1] & 0x03) ? 1 : 0;
> +
> +       return 1;
> +}
> +#endif
> +

Your description says the higher order byte comes first.
And could you use le16_to_cpu() rsp. be16_to_cpu() to read the values?
It is easier to read.

	Regards
		Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ