2003-08-09 19:19:15

by Nicolas P.

[permalink] [raw]
Subject: ov511 2.6.0-test3


It is new to kernel 2.6.0-test3 :

*** Warning: "video_proc_entry" [drivers/usb/media/ov511.ko] undefined!

And documentation seems obsolete :

This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Character Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.


Not any more under Character Devices, isn't it ?

Regards.

Nicolas.


2003-08-09 21:46:10

by Stefan B

[permalink] [raw]
Subject: Re: ov511 2.6.0-test3

Nicolas P. wrote:
> It is new to kernel 2.6.0-test3 :
>
> *** Warning: "video_proc_entry" [drivers/usb/media/ov511.ko] undefined!
>

Try adding this to driver/media/video/videodev.c:
(e.g. after the other EXPORT_SYMBOL lines)

void *video_proc_entry;
EXPORT_SYMBOL(video_proc_entry);

Stefan B.


2003-08-09 22:11:13

by Mark McClelland

[permalink] [raw]
Subject: Re: ov511 2.6.0-test3

Nicolas P. wrote:

>It is new to kernel 2.6.0-test3 :
>
>*** Warning: "video_proc_entry" [drivers/usb/media/ov511.ko] undefined!
>
>

That's due to the removal of /proc/video and its replacement with sysfs.
I'll submit a patch for that later today.

>And documentation seems obsolete :
>
>This driver uses the Video For Linux API. You must say Y or M to
>"Video For Linux" (under Character Devices) to use this driver.
>Information on this API and pointers to "v4l" programs may be found
>on the WWW at <http://roadrunner.swansea.uk.linux.org/v4l.shtml>.
>
>
>Not any more under Character Devices, isn't it ?
>

Thanks for noticing that. I'll fix that too.

--
Mark McClelland
[email protected]


2003-08-10 05:14:17

by Stefan B

[permalink] [raw]
Subject: Re: ov511 2.6.0-test3

diff -Nru drivers/media/video/videodev.c
--- drivers/media/video/videodev.c Sun Aug 10 07:01:27 2003
+++ drivers/media/video/videodev.c Sun Aug 10 07:05:37 2003
@@ -367,6 +367,8 @@
* Initialise video for linux
*/

+struct proc_dir_entry *video_proc_entry = NULL;
+
static int __init videodev_init(void)
{
printk(KERN_INFO "Linux video capture interface: v1.00\n");
@@ -375,11 +377,19 @@
return -EIO;
}
class_register(&video_class);
+
+ video_proc_entry = create_proc_entry("video", S_IFDIR, &proc_root);
+ if (video_proc_entry)
+ video_proc_entry->owner = THIS_MODULE;
return 0;
}

static void __exit videodev_exit(void)
{
+ if (video_proc_entry)
+ remove_proc_entry("video", &proc_root);
+ video_proc_entry = NULL;
+
class_unregister(&video_class);
unregister_chrdev(VIDEO_MAJOR, VIDEO_NAME);
}
@@ -395,6 +405,7 @@
EXPORT_SYMBOL(video_exclusive_release);
EXPORT_SYMBOL(video_device_alloc);
EXPORT_SYMBOL(video_device_release);
+EXPORT_SYMBOL(video_proc_entry);

MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("Device registrar for Video4Linux drivers");


Attachments:
patch-2.6.0-test3-videoproc (1.07 kB)

2003-08-10 13:29:24

by Mark McClelland

[permalink] [raw]
Subject: Re: ov511 2.6.0-test3

Stefan B wrote:

> Stefan B. wrote:
>
>> Try adding this to driver/media/video/videodev.c:
>> (e.g. after the other EXPORT_SYMBOL lines)
>>
>> void *video_proc_entry;
>> EXPORT_SYMBOL(video_proc_entry);
>
> sorry, not good; this patch should do


Unless you need the /proc support for something, an easier solution is
just to disable CONFIG_VIDEO_PROC_FS.

Gerd, did you leave that config option in on purpose (so that the broken
drivers would get noticed)?

Ps.: The ov511 sysfs conversion patch should be finished this evening.
It will be sent to Linux-USB-Devel.

--
Mark McClelland
[email protected]