Index: r5u870.c
===================================================================
--- r5u870.c	(revision 107)
+++ r5u870.c	(working copy)
@@ -858,14 +858,21 @@
 
 /* TODO: Merge these into V4L API. */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
 #define V4L2_CID_GREEN_BALANCE		(V4L2_CID_BASE+24)
-#define V4L2_CID_AUTOEXPOSURE		(V4L2_CID_BASE+25)
-#define V4L2_CID_POWER_LINE_FREQ	(V4L2_CID_BASE+26)
-#define V4L2_CID_BACKLIGHT_COMP		(V4L2_CID_BASE+27)
+#define V4L2_CID_EXPOSURE_AUTO		(V4L2_CID_BASE+25)
+#define V4L2_CID_POWER_LINE_FREQUENCY	(V4L2_CID_BASE+26)
+#define V4L2_CID_BACKLIGHT_COMPENSATION	(V4L2_CID_BASE+27)
 #define V4L2_CID_PRIVACY		(V4L2_CID_BASE+28)
 #define V4L2_CID_NIGHT_MODE		(V4L2_CID_BASE+29)
 #define V4L2_CID_SHARPNESS		(V4L2_CID_BASE+30)
 #define V4L2_CID_LASTP1			(V4L2_CID_BASE+31) /* last CID + 1 */
+#else
+#define V4L2_CID_GREEN_BALANCE		(V4L2_CID_BASE+31)
+#define V4L2_CID_PRIVACY		(V4L2_CID_BASE+32)
+#define V4L2_CID_NIGHT_MODE		(V4L2_CID_BASE+33)
+#define V4L2_CID_LASTP1			(V4L2_CID_BASE+34) /* last CID + 1 */
+#endif
 
 /* 2007-09-09 TJ Ensure names are identical to uvcvideo,
  * so user applications aren't confused by differing results for UVC queries */
@@ -953,7 +960,7 @@
 		.reg = R5U870_REG_GAMMA,
 	},
 	[R5U870_WDM_CTRL_BACKLIGHT_COMP_500] = {
-		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMP,
+		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMPENSATION,
 					  .type = V4L2_CTRL_TYPE_INTEGER,
 					  .name = "Backlight Compensation",
 					  .minimum = 0,
@@ -966,7 +973,7 @@
 		.reg = R5U870_REG_BACKLIGHT_COMP,
 	},
 	[R5U870_WDM_CTRL_BACKLIGHT_COMP_500_DEF1] = {
-		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMP,
+		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMPENSATION,
 					  .type = V4L2_CTRL_TYPE_INTEGER,
 					  .name = "Backlight Compensation",
 					  .minimum = 0,
@@ -979,7 +986,7 @@
 		.reg = R5U870_REG_BACKLIGHT_COMP,
 	},
 	[R5U870_WDM_CTRL_BACKLIGHT_COMP_X1834] = {
-		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMP,
+		.base = { .uc_v4l = { .id = V4L2_CID_BACKLIGHT_COMPENSATION,
 					  .type = V4L2_CTRL_TYPE_INTEGER,
 					  .name = "Backlight Compensation",
 					  .minimum = 0,
@@ -1052,7 +1059,7 @@
 		.val_offset = offsetof(struct r5u870_ctx, vh_auto_wb)
 	},
 	[R5U870_WDM_CTRL_AUTO_EXPOSURE] = {
-		.base = { .uc_v4l = { .id = V4L2_CID_AUTOEXPOSURE,
+		.base = { .uc_v4l = { .id = V4L2_CID_EXPOSURE_AUTO,
 					  .type = V4L2_CTRL_TYPE_BOOLEAN,
 					  .name = "Auto Exposure Control",
 					  .minimum = 0,
@@ -1112,7 +1119,7 @@
 		.auto_offset = offsetof(struct r5u870_ctx, vh_agc)
 	},
 	[R5U870_WDM_CTRL_POWERLINE] = {
-		.base = { .uc_v4l = { .id = V4L2_CID_POWER_LINE_FREQ,
+		.base = { .uc_v4l = { .id = V4L2_CID_POWER_LINE_FREQUENCY,
 					  .type = V4L2_CTRL_TYPE_MENU,
 					  .name = "Power Line Frequency",
 					  .minimum = 0,
@@ -1710,14 +1717,14 @@
 	  .ci_size = 2,
 	  .ci_bm_index = 5 },
 	{ .ci_name = "Backlight Compensation",
-	  .ci_v4l_id = V4L2_CID_BACKLIGHT_COMP,
+	  .ci_v4l_id = V4L2_CID_BACKLIGHT_COMPENSATION,
 	  .ci_v4l_type = V4L2_CTRL_TYPE_INTEGER,
 	  .ci_v4l_flags = V4L2_CTRL_FLAG_SLIDER,
 	  .ci_reg = UVC_PU_BACKLIGHT_COMPENSATION_CONTROL,
 	  .ci_size = 2,
 	  .ci_bm_index = 8 },
 	{ .ci_name = "Power Line Frequency",
-	  .ci_v4l_id = V4L2_CID_POWER_LINE_FREQ,
+	  .ci_v4l_id = V4L2_CID_POWER_LINE_FREQUENCY,
 	  .ci_v4l_type = V4L2_CTRL_TYPE_MENU,
 	  .ci_reg = UVC_PU_POWER_LINE_FREQUENCY_CONTROL,
 	  .ci_size = 1,
Index: usbcam/usbcam_fops.c
===================================================================
--- usbcam/usbcam_fops.c	(revision 107)
+++ usbcam/usbcam_fops.c	(working copy)
@@ -82,6 +82,8 @@
 	"VIDIOCSVBIFMT",
 };
 
+spinlock_t slock;
+
 static unsigned int __pure
 palette_to_pixelformat(unsigned int palette)
 {
@@ -149,7 +151,7 @@
 	videobuf_queue_pci_init(&ufp->ufh_vbq,
 			    &usbcam_videobuf_qops,
 			    NULL,
-			    NULL,
+			    &slock,
 			    V4L2_BUF_TYPE_VIDEO_CAPTURE,
 			    V4L2_FIELD_INTERLACED,
 			    sizeof(struct usbcam_frame), ufp);
