summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102_core.c2
-rw-r--r--v4l/compat.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/linux/drivers/media/video/sn9c102/sn9c102_core.c b/linux/drivers/media/video/sn9c102/sn9c102_core.c
index dc8fd17b6..5740518b0 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c
@@ -528,7 +528,7 @@ sn9c102_find_sof_header(struct sn9c102_device* cam, void* mem, size_t len)
/* Search for the SOF marker (fixed part) in the header */
for (j = 0, b=cam->sof.bytesread; j+b < sizeof(marker); j++) {
- if (unlikely(i+j) == len)
+ if (unlikely(i+j == len))
return NULL;
if (*(m+i+j) == marker[cam->sof.bytesread]) {
cam->sof.header[cam->sof.bytesread] = *(m+i+j);
diff --git a/v4l/compat.h b/v4l/compat.h
index 581262bdf..0352fcd39 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -20,7 +20,8 @@
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
-# define set_freezable()
+#define set_freezable()
+#define cancel_delayed_work_sync cancel_rearming_delayed_work
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)