Skip to contentSkip to conversation

V4L/DVB: uvc: remove unused #include <version.h>

v4l-dvb-maintainer Laurent Pinchart 1 participant 1 message Sep 15, 2008 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 5 lines · Huang Weiyi

The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/media/video/pwc/pwc-ctrl.c

This patch removes the said #include <version.h>.
drivers/media/video/uvc/uvc_v4l2.c

This breaks compilation on 2.6.27-rc6 (and probably older kernels as well).

CC [M] drivers/media/video/uvc/uvc_v4l2.o drivers/media/video/uvc/uvc_v4l2.c: In function ‘uvc_v4l2_do_ioctl’:
drivers/media/video/uvc/uvc_v4l2.c:491: error: implicit declaration of function ‘KERNEL_VERSION’
make[4]: *** [drivers/media/video/uvc/uvc_v4l2.o] Error 1 make[3]: *** [drivers/media/video/uvc] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2

The linux/version.h include should either be kept in uvc_v4l2.c or moved to uvcvideo.h.

Quoted 2 lines

drivers/media/video/uvc/uvc_ctrl.c
drivers/media/video/uvc/uvc_driver.c

While you're at it, you can also remove linux/version.h from uvc_queue.c, uvc_status.c and uvc_video.c.

Quoted 31 lines
(quoted diff) +0 -0

b/drivers/media/video/uvc/uvc_v4l2.c index d7bd71b..70ec240 100644

drivers/media/video/uvc/uvc_v4l2.c +0 -1
@@ -12,7 +12,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/version.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/usb.h>
(quoted diff) +0 -0

b/drivers/media/video/uvc/uvc_ctrl.c index 6ef3e52..65bfa2f 100644

drivers/media/video/uvc/uvc_ctrl.c +0 -1
@@ -12,7 +12,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/version.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/uaccess.h>
(quoted diff) +0 -0

b/drivers/media/video/uvc/uvc_driver.c index 7e10203..2d959aa 100644

drivers/media/video/uvc/uvc_driver.c line 29

Quoted 7 lines
drivers/media/video/uvc/uvc_driver.c +0 -1
@@ -24,7 +24,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/version.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/usb.h>

Best regards,

Laurent Pinchart

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list