staging: fusb302: don't bitshift __le16 type
authorFrans Klaver <fransklaver@gmail.com>
Fri, 16 Jun 2017 17:45:56 +0000 (19:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2017 16:47:59 +0000 (18:47 +0200)
commitb9e8caa7a67535fc544c2504fae3e71a02cfb01a
tree4d0a87c4aa415bb94bfaf804d46277e24dbdf22e
parent1877e4ba2d0890244284eea101681b6f990aa2be
staging: fusb302: don't bitshift __le16 type

The header field in struct pd_message is declared as an __le16 type. The
data in the message is supposed to be little endian. This means we don't
have to go and shift the individual bytes into position when we're
filling the buffer, we can just copy the contents right away. As an
added benefit we don't get fishy results on big endian systems anymore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/fusb302/fusb302.c