Make the USB Video Class debug filesystem support compile time optional.
PATCH 1/1 Make the USB Video Class debug filesystem support compile time optional.
The following patch makes the recently added DEBUGFS for UVC optional.
--HPS
Signed-off-by Hans Petter Selasky <[email protected]>
--- drivers/media/video/uvc/Kconfig | 9 +++++++++ drivers/media/video/uvc/Makefile | 5 ++++- drivers/media/video/uvc/uvc_driver.c | 12 ++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-)
drivers/media/video/uvc/Kconfig +9 -0
@@ -7,6 +7,15 @@ config USB_VIDEO_CLASS For more information see: <http://linux-uvc.berlios.de/> +config USB_VIDEO_CLASS_DEBUGFS + bool "UVC debugfs support" + default y + ---help--- + This option makes the USB Video Class driver build with + debugfs support. + + If you are in doubt, say Y. + config USB_VIDEO_CLASS_INPUT_EVDEV bool "UVC input events device support" default y
drivers/media/video/uvc/Makefile +4 -1
@@ -1,5 +1,8 @@ uvcvideo-objs := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o \ - uvc_status.o uvc_isight.o uvc_debugfs.o + uvc_status.o uvc_isight.o +ifeq ($(CONFIG_USB_VIDEO_CLASS_DEBUGFS),y) +uvcvideo-objs += uvc_debugfs.o +endif ifeq ($(CONFIG_MEDIA_CONTROLLER),y) uvcvideo-objs += uvc_entity.o endif
(quoted diff) +0 -0
b/drivers/media/video/uvc/uvc_driver.c
index a240d43..291f77b 100644
drivers/media/video/uvc/uvc_driver.c +10 -2
@@ -1676,7 +1676,9 @@ static void uvc_unregister_video(struct uvc_device *dev)video_unregister_device (stream->vdev); stream->vdev =NULL ; +#ifdef CONFIG_USB_VIDEO_CLASS_DEBUGFS uvc_debugfs_cleanup_stream (stream); +#endif }/* Decrement the stream count and call uvc_delete explicitly if there
@@ -1702,8 +1704,9 @@ static int uvc_register_video(struct uvc_device *dev,return ret; } +#ifdef CONFIG_USB_VIDEO_CLASS_DEBUGFS uvc_debugfs_init_stream (stream); - +#endif /* Register the device with V4L. */ vdev =video_device_alloc ();if (vdev ==NULL ) {
@@ -2411,11 +2414,14 @@ static int __init uvc_init(void) {int ret; +#ifdef CONFIG_USB_VIDEO_CLASS_DEBUGFS uvc_debugfs_init (); - +#endif ret =usb_register (&uvc_driver.driver);if (ret <0 ) { +#ifdef CONFIG_USB_VIDEO_CLASS_DEBUGFS uvc_debugfs_cleanup (); +#endif return ret; }
@@ -2426,7 +2432,9 @@ static int __init uvc_init(void) static void __exit uvc_cleanup(void) {usb_deregister (&uvc_driver.driver); +#ifdef CONFIG_USB_VIDEO_CLASS_DEBUGFS uvc_debugfs_cleanup (); +#endif }module_init (uvc_init);
Signature · 1 line
1.7.6
Quoted 4 lines · On Tuesday 14 February 2012 22:15:51 Hans Petter Selasky wrote:
The following patch makes the recently added DEBUGFS for UVC optional.
--HPS
Please ignore this patch. It appears that the DEBUGFS can be disabled by including the correct debugfs.h header file.
--HPS