From 047dfb0a62056f114245e9aee03b1cdc920ee209 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Sun, 17 Feb 2008 17:53:19 -0300 Subject: compat.h: Keep cancel_delayed_work_sync() compatible with kernel < 2.6.23 From: Tobias Lorenz Added define to keep cancel_delayed_work_sync() compatible with old kernel. (< 2.6.23) Signed-off-by: Tobias Lorenz Reviewed-by: Douglas Schilling Landgraf --- v4l/compat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3 From d204fde57077927f62435f4ee1d1fcf1fb85f089 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 18 Feb 2008 09:57:24 +0000 Subject: drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y From: Roel Kluin <12o3l@tiscali.nl> Fix Unlikely(x) == y Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Reviewed-by: Luca Risolia Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/sn9c102/sn9c102_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3