]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] radio-tea5764: fix sparse warnings
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 20 Aug 2014 19:40:00 +0000 (16:40 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 12:30:56 +0000 (09:30 -0300)
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:168:24: warning: cast to restricted __be16
drivers/media/radio/radio-tea5764.c:185:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:186:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:187:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:188:20: warning: incorrect type in assignment (different base types)
drivers/media/radio/radio-tea5764.c:189:20: warning: incorrect type in assignment (different base types)

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/radio/radio-tea5764.c

index 925049654c5bc0f33429b45b5cab5fff3795f8e8..cc3990111411bd8b06b4d86ad3d4da9b72a54c94 100644 (file)
@@ -124,11 +124,11 @@ struct tea5764_regs {
 
 struct tea5764_write_regs {
        u8 intreg;                              /* INTMSK */
-       u16 frqset;                             /* FRQSETMSB & FRQSETLSB */
-       u16 tnctrl;                             /* TNCTRL1 & TNCTRL2 */
-       u16 testreg;                            /* TESTBITS & TESTMODE */
-       u16 rdsctrl;                            /* RDSCTRL1 & RDSCTRL2 */
-       u16 rdsbbl;                             /* PAUSEDET & RDSBBL */
+       __be16 frqset;                          /* FRQSETMSB & FRQSETLSB */
+       __be16 tnctrl;                          /* TNCTRL1 & TNCTRL2 */
+       __be16 testreg;                         /* TESTBITS & TESTMODE */
+       __be16 rdsctrl;                         /* RDSCTRL1 & RDSCTRL2 */
+       __be16 rdsbbl;                          /* PAUSEDET & RDSBBL */
 } __attribute__ ((packed));
 
 #ifdef CONFIG_RADIO_TEA5764_XTAL
@@ -165,7 +165,7 @@ static int tea5764_i2c_read(struct tea5764_device *radio)
        if (i2c_transfer(radio->i2c_client->adapter, msgs, 1) != 1)
                return -EIO;
        for (i = 0; i < sizeof(struct tea5764_regs) / sizeof(u16); i++)
-               p[i] = __be16_to_cpu(p[i]);
+               p[i] = __be16_to_cpu((__force __be16)p[i]);
 
        return 0;
 }