]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] dw2102: fix sparse warnings
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 20 Aug 2014 19:45:27 +0000 (16:45 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 12:31:31 +0000 (09:31 -0300)
drivers/media/usb/dvb-usb/dw2102.c:670:65: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1601:32: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1644:40: warning: restricted __le16 degrades to integer
drivers/media/usb/dvb-usb/dw2102.c:1904:34: warning: symbol 'p1100' was not declared. Should it be static?
drivers/media/usb/dvb-usb/dw2102.c:1911:34: warning: symbol 's660' was not declared. Should it be static?
drivers/media/usb/dvb-usb/dw2102.c:1930:34: warning: symbol 'p7500' was not declared. Should it be static?
drivers/media/usb/dvb-usb/dw2102.c:1937:34: warning: symbol 's421' was not declared. Should it be static?

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

index 2add8c507ec9ecd6cf2d27b7097a9c7e98fe9d2d..1a3df10d6bad5e1c1354874c8d715a7f6e5629c0 100644 (file)
@@ -667,7 +667,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
                                obuf[1] = (msg[j].addr << 1);
                                memcpy(obuf + 2, msg[j].buf, msg[j].len);
                                dw210x_op_rw(d->udev,
-                                               udev->descriptor.idProduct ==
+                                               le16_to_cpu(udev->descriptor.idProduct) ==
                                                0x7500 ? 0x92 : 0x90, 0, 0,
                                                obuf, msg[j].len + 2,
                                                DW210X_WRITE_MSG);
@@ -1598,7 +1598,7 @@ static int dw2102_load_firmware(struct usb_device *dev,
        u8 reset16[] = {0, 0, 0, 0, 0, 0, 0};
        const struct firmware *fw;
 
-       switch (dev->descriptor.idProduct) {
+       switch (le16_to_cpu(dev->descriptor.idProduct)) {
        case 0x2101:
                ret = request_firmware(&fw, DW2101_FIRMWARE, &dev->dev);
                if (ret != 0) {
@@ -1641,7 +1641,7 @@ static int dw2102_load_firmware(struct usb_device *dev,
                        ret = -EINVAL;
                }
                /* init registers */
-               switch (dev->descriptor.idProduct) {
+               switch (le16_to_cpu(dev->descriptor.idProduct)) {
                case USB_PID_TEVII_S650:
                        dw2104_properties.rc.core.rc_codes = RC_MAP_TEVII_NEC;
                case USB_PID_DW2104:
@@ -1901,14 +1901,14 @@ static struct dvb_usb_device_properties s6x0_properties = {
        }
 };
 
-struct dvb_usb_device_properties *p1100;
+static struct dvb_usb_device_properties *p1100;
 static struct dvb_usb_device_description d1100 = {
        "Prof 1100 USB ",
        {&dw2102_table[PROF_1100], NULL},
        {NULL},
 };
 
-struct dvb_usb_device_properties *s660;
+static struct dvb_usb_device_properties *s660;
 static struct dvb_usb_device_description d660 = {
        "TeVii S660 USB",
        {&dw2102_table[TEVII_S660], NULL},
@@ -1927,14 +1927,14 @@ static struct dvb_usb_device_description d480_2 = {
        {NULL},
 };
 
-struct dvb_usb_device_properties *p7500;
+static struct dvb_usb_device_properties *p7500;
 static struct dvb_usb_device_description d7500 = {
        "Prof 7500 USB DVB-S2",
        {&dw2102_table[PROF_7500], NULL},
        {NULL},
 };
 
-struct dvb_usb_device_properties *s421;
+static struct dvb_usb_device_properties *s421;
 static struct dvb_usb_device_description d421 = {
        "TeVii S421 PCI",
        {&dw2102_table[TEVII_S421], NULL},