* [PATCH 2.6.0-test4] meye driver update
@ 2003-09-01 15:13 Stelian Pop
0 siblings, 0 replies; 2+ messages in thread
From: Stelian Pop @ 2003-09-01 15:13 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Linus Torvalds
Hi,
The attached patch implements the needed 'release' callback in order
to make videodev/sysfs happy again.
Linus, please apply.
Thanks,
Stelian.
===== drivers/media/video/meye.h 1.8 vs edited =====
--- 1.8/drivers/media/video/meye.h Wed Apr 16 12:01:38 2003
+++ edited/drivers/media/video/meye.h Tue Aug 26 16:48:06 2003
@@ -312,7 +312,7 @@
struct meye_queue grabq; /* queue for buffers to be grabbed */
- struct video_device video_dev; /* video device parameters */
+ struct video_device *video_dev; /* video device parameters */
struct video_picture picture; /* video picture parameters */
struct meye_params params; /* additional parameters */
#ifdef CONFIG_PM
===== drivers/media/video/meye.c 1.18 vs edited =====
--- 1.18/drivers/media/video/meye.c Thu Jul 31 17:59:04 2003
+++ edited/drivers/media/video/meye.c Wed Aug 27 11:24:51 2003
@@ -920,7 +920,7 @@
case VIDIOCGCAP: {
struct video_capability *b = arg;
- strcpy(b->name,meye.video_dev.name);
+ strcpy(b->name,meye.video_dev->name);
b->type = VID_TYPE_CAPTURE;
b->channels = 1;
b->audios = 0;
@@ -1225,6 +1225,8 @@
.type = VID_TYPE_CAPTURE,
.hardware = VID_HARDWARE_MEYE,
.fops = &meye_fops,
+ .release = video_device_release,
+ .minor = -1,
};
#ifdef CONFIG_PM
@@ -1275,10 +1277,17 @@
goto out1;
}
- sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1);
-
meye.mchip_dev = pcidev;
- memcpy(&meye.video_dev, &meye_template, sizeof(meye_template));
+ meye.video_dev = video_device_alloc();
+ if (!meye.video_dev) {
+ printk(KERN_ERR "meye: video_device_alloc() failed!\n");
+ ret = -EBUSY;
+ goto out1;
+ }
+ memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
+ meye.video_dev->dev = &meye.mchip_dev->dev;
+
+ sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1);
if ((ret = pci_enable_device(meye.mchip_dev))) {
printk(KERN_ERR "meye: pci_enable_device failed\n");
@@ -1335,7 +1344,7 @@
wait_ms(1);
mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
- if (video_register_device(&meye.video_dev, VFL_TYPE_GRABBER, video_nr) < 0) {
+ if (video_register_device(meye.video_dev, VFL_TYPE_GRABBER, video_nr) < 0) {
printk(KERN_ERR "meye: video_register_device failed\n");
ret = -EIO;
@@ -1383,6 +1392,9 @@
out3:
pci_disable_device(meye.mchip_dev);
out2:
+ video_device_release(meye.video_dev);
+ meye.video_dev = NULL;
+
sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
out1:
return ret;
@@ -1390,7 +1402,7 @@
static void __devexit meye_remove(struct pci_dev *pcidev) {
- video_unregister_device(&meye.video_dev);
+ video_unregister_device(meye.video_dev);
mchip_hic_stop();
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2.6.0-test4] meye driver update
@ 2003-08-26 14:17 Stelian Pop
0 siblings, 0 replies; 2+ messages in thread
From: Stelian Pop @ 2003-08-26 14:17 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Linus Torvalds
Hi,
In order to bring the 2.4 and 2.6 versions in sync, here is the
missing bit for the meye driver :)
Now I need to go read the sysfs docs for the XXth time and try to
understand why videodev suddenly decided 'meye' needs yet another
release callback... :(
Meanwhile, Linus, please apply.
Stelian.
===== Documentation/video4linux/meye.txt 1.6 vs edited =====
--- 1.6/Documentation/video4linux/meye.txt Tue Feb 18 12:32:29 2003
+++ edited/Documentation/video4linux/meye.txt Fri Aug 1 12:47:51 2003
@@ -16,6 +16,23 @@
MJPEG hardware grabbing is supported via a private API (see below).
+Hardware supported:
+-------------------
+
+This driver supports the 'second' version of the MotionEye camera :)
+
+The first version was connected directly on the video bus of the Neomagic
+video card and is unsupported.
+
+The second one, made by Kawasaki Steel is fully supported by this
+driver (PCI vendor/device is 0x136b/0xff01)
+
+The third one, present in recent (more or less last year) Picturebooks
+(C1M* models), is not supported. The manufacturer has given the specs
+to the developers under a NDA (which allows the develoment of a GPL
+driver however), but things are not moving very fast (see
+http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011).
+
Driver options:
---------------
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-01 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-01 15:13 [PATCH 2.6.0-test4] meye driver update Stelian Pop
-- strict thread matches above, loose matches on Subject: below --
2003-08-26 14:17 Stelian Pop
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®