summaryrefslogtreecommitdiff
path: root/drivers/media/usb/hdpvr/hdpvr-core.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-10-04 11:01:39 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-10-15 12:54:20 -0300
commitc8e479c48326d3c2dbd55e61f0da00694df472a8 (patch)
tree0655a42770940825ccdf3bd877c312b8e91adfe9 /drivers/media/usb/hdpvr/hdpvr-core.c
parent15807765d81dd71ab4e43517257e5e0ddcc2bc3b (diff)
[media] hdpvr: fix sparse warnings
drivers/media/usb/hdpvr/hdpvr-core.c:110:54: warning: incorrect type in argument 1 (different base types) drivers/media/usb/hdpvr/hdpvr-core.c:112:39: warning: invalid assignment: += drivers/media/usb/hdpvr/hdpvr-core.c:304:26: warning: Using plain integer as NULL pointer Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/hdpvr/hdpvr-core.c')
-rw-r--r--drivers/media/usb/hdpvr/hdpvr-core.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c
index 6e5070774dc2..2f0c89cbac76 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -78,7 +78,8 @@ void hdpvr_delete(struct hdpvr_device *dev)
static void challenge(u8 *bytes)
{
- u64 *i64P, tmp64;
+ __le64 *i64P;
+ u64 tmp64;
uint i, idx;
for (idx = 0; idx < 32; ++idx) {
@@ -106,10 +107,10 @@ static void challenge(u8 *bytes)
for (i = 0; i < 3; i++)
bytes[1] *= bytes[6] + 1;
for (i = 0; i < 3; i++) {
- i64P = (u64 *)bytes;
+ i64P = (__le64 *)bytes;
tmp64 = le64_to_cpup(i64P);
- tmp64 <<= bytes[7] & 0x0f;
- *i64P += cpu_to_le64(tmp64);
+ tmp64 = tmp64 + (tmp64 << (bytes[7] & 0x0f));
+ *i64P = cpu_to_le64(tmp64);
}
break;
}
@@ -301,8 +302,6 @@ static int hdpvr_probe(struct usb_interface *interface,
goto error;
}
- dev->workqueue = 0;
-
/* init video transfer queues first of all */
/* to prevent oops in hdpvr_delete() on error paths */
INIT_LIST_HEAD(&dev->free_buff_list);