From 039647d64a2b2e7065e250580e0d10b9f3320af7 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 31 Aug 2008 23:19:51 +0200 Subject: uvcvideo: fix compilation on older kernels From: Laurent Pinchart The USB reset_resume method appeared in 2.6.23. This patch fixes compilation of the v4l-dvb tree on older kernels. Priority: normal Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil --- linux/drivers/media/video/uvc/uvc_driver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c index 4ab4d1ebb..b2482502a 100644 --- a/linux/drivers/media/video/uvc/uvc_driver.c +++ b/linux/drivers/media/video/uvc/uvc_driver.c @@ -1692,10 +1692,12 @@ static int uvc_resume(struct usb_interface *intf) return __uvc_resume(intf, 0); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) static int uvc_reset_resume(struct usb_interface *intf) { return __uvc_resume(intf, 1); } +#endif /* ------------------------------------------------------------------------ * Driver initialization and cleanup @@ -1971,7 +1973,9 @@ struct uvc_driver uvc_driver = { .disconnect = uvc_disconnect, .suspend = uvc_suspend, .resume = uvc_resume, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) .reset_resume = uvc_reset_resume, +#endif .id_table = uvc_ids, .supports_autosuspend = 1, }, -- cgit v1.2.3