Input: yealink - define packet offset __be16 instead of u16
authorMartin Kepplinger <martin.kepplinger@ginzinger.com>
Tue, 11 Apr 2017 03:39:22 +0000 (20:39 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 11 Apr 2017 03:41:41 +0000 (20:41 -0700)
sparse says

 warning: incorrect type in assignment (different base types)
    expected unsigned short [unsigned] [usertype] offset
    got restricted __be16 [usertype] <noident>

for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the
first place shouldn't hurt.

Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
Signed-off-by: Henk.Vergonet@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/yealink.h

index 1e0f5239701008544c4893d120a1c9bbeb140705..934c247f8a0f2de5781f7c89bcfe14155fec7f14 100644 (file)
@@ -28,7 +28,7 @@
 struct yld_ctl_packet {
        u8      cmd;            /* command code, see below */
        u8      size;           /* 1-11, size of used data bytes. */
-       u16     offset;         /* internal packet offset */
+       __be16  offset;         /* internal packet offset */
        u8      data[11];
        s8      sum;            /* negative sum of 15 preceding bytes */
 } __attribute__ ((packed));