mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.4.23-pre2] meye driver update
@ 2003-09-01 15:11 Stelian Pop
  0 siblings, 0 replies; only message in thread
From: Stelian Pop @ 2003-09-01 15:11 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Marcelo Tosatti

Hi,

This is a sync with the 2.5 meye driver. Nothing really important here,
just makes it easier for me to maintain both branches.

Marcelo, please apply.

Thanks,

Stelian.

===== drivers/media/video/meye.h 1.8 vs edited =====
--- 1.8/drivers/media/video/meye.h	Sun Jun 29 18:27:44 2003
+++ edited/drivers/media/video/meye.h	Mon Sep  1 10:38:50 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.15 vs edited =====
--- 1.15/drivers/media/video/meye.c	Mon Jul  7 13:48:00 2003
+++ edited/drivers/media/video/meye.c	Wed Aug 27 11:25:49 2003
@@ -947,7 +947,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;
@@ -1252,6 +1252,7 @@
 	.type		= VID_TYPE_CAPTURE,
 	.hardware	= VID_HARDWARE_MEYE,
 	.fops		= &meye_fops,
+	.minor		= -1,
 };
 
 #ifdef CONFIG_PM
@@ -1302,10 +1303,16 @@
 		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 = kmalloc(sizeof(struct video_device), GFP_KERNEL);
+	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));
+
+	sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1);
 
 	if ((ret = pci_enable_device(meye.mchip_dev))) {
 		printk(KERN_ERR "meye: pci_enable_device failed\n");
@@ -1362,7 +1369,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;
@@ -1410,6 +1417,9 @@
 out3:
 	pci_disable_device(meye.mchip_dev);
 out2:
+	kfree(meye.video_dev);
+	meye.video_dev = NULL;
+
 	sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
 out1:
 	return ret;
@@ -1417,7 +1427,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();
 
@@ -1443,7 +1453,7 @@
 	printk(KERN_INFO "meye: removed\n");
 }
 
-static struct pci_device_id meye_pci_tbl[] __devinitdata = {
+static struct pci_device_id meye_pci_tbl[] = {
 	{ PCI_VENDOR_ID_KAWASAKI, PCI_DEVICE_ID_MCHIP_KL5A72002, 
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ }
@@ -1502,8 +1512,6 @@
 MODULE_AUTHOR("Stelian Pop <stelian@popies.net>");
 MODULE_DESCRIPTION("video4linux driver for the MotionEye camera");
 MODULE_LICENSE("GPL");
-
-EXPORT_NO_SYMBOLS;
 
 MODULE_PARM(gbuffers,"i");
 MODULE_PARM_DESC(gbuffers,"number of capture buffers, default is 2 (32 max)");
-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-09-01 15:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-01 15:11 [PATCH 2.4.23-pre2] meye driver update 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®