public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4.23-pre8] meye driver update
@ 2003-10-26 16:47 Stelian Pop
  0 siblings, 0 replies; only message in thread
From: Stelian Pop @ 2003-10-26 16:47 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: marcelo.tosatti

Hi,

This patch updates the meye driver with:
	* some documentation on a forth camera model (unsupported)
	* headers cleanup backported from 2.6
	* irqreturn_t constructs backported from 2.6
	* use the new videodev video_device_alloc/video_device_release

Marcelo, please apply.

Thanks,

Stelian.


===== Documentation/video4linux/meye.txt 1.7 vs edited =====
--- 1.7/Documentation/video4linux/meye.txt	Fri Aug  1 14:47:23 2003
+++ edited/Documentation/video4linux/meye.txt	Sun Oct 26 14:57:58 2003
@@ -33,6 +33,11 @@
 driver however), but things are not moving very fast (see
 http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011).
 
+There is a forth model connected on the USB bus in TR1* Vaio laptops.
+This camera is not supported at all by the current driver, in fact
+little information if any is available for this camera
+(USB vendor/device is 0x054c/0x0107).
+
 Driver options:
 ---------------
 
===== drivers/media/video/meye.h 1.9 vs edited =====
--- 1.9/drivers/media/video/meye.h	Mon Sep  1 12:38:50 2003
+++ edited/drivers/media/video/meye.h	Sun Oct 26 15:32:45 2003
@@ -31,13 +31,11 @@
 #define _MEYE_PRIV_H_
 
 #define MEYE_DRIVER_MAJORVERSION	1
-#define MEYE_DRIVER_MINORVERSION	7
+#define MEYE_DRIVER_MINORVERSION	8
 
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/sonypi.h>
-#include <linux/meye.h>
 
 /****************************************************************************/
 /* Motion JPEG chip registers                                               */
===== drivers/media/video/meye.c 1.16 vs edited =====
--- 1.16/drivers/media/video/meye.c	Wed Aug 27 13:25:49 2003
+++ edited/drivers/media/video/meye.c	Sun Oct 26 16:21:57 2003
@@ -862,7 +862,7 @@
 /* Interrupt handling                                                       */
 /****************************************************************************/
 
-static void meye_irq(int irq, void *dev_id, struct pt_regs *regs) {
+static irqreturn_t meye_irq(int irq, void *dev_id, struct pt_regs *regs) {
 	u32 v;
 	int reqnr;
 	v = mchip_read(MCHIP_MM_INTA);
@@ -870,7 +870,7 @@
 	while (1) {
 		v = mchip_get_frame();
 		if (!(v & MCHIP_MM_FIR_RDY))
-			return;
+			return IRQ_NONE;
 		switch (meye.mchip_mode) {
 
 		case MCHIP_HIC_MODE_CONT_OUT:
@@ -903,11 +903,12 @@
 
 		default:
 			/* do not free frame, since it can be a snap */
-			return;
+			return IRQ_NONE;
 		} /* switch */
 
 		mchip_free_frame();
 	}
+	return IRQ_HANDLED;
 }
 
 /****************************************************************************/
@@ -1252,6 +1253,7 @@
 	.type		= VID_TYPE_CAPTURE,
 	.hardware	= VID_HARDWARE_MEYE,
 	.fops		= &meye_fops,
+	.release	= video_device_release,
 	.minor		= -1,
 };
 
@@ -1304,7 +1306,7 @@
 	}
 
 	meye.mchip_dev = pcidev;
-	meye.video_dev = kmalloc(sizeof(struct video_device), GFP_KERNEL);
+	meye.video_dev = video_device_alloc();
 	if (!meye.video_dev) {
 		printk(KERN_ERR "meye: video_device_alloc() failed!\n");
 		ret = -EBUSY;
@@ -1417,7 +1419,7 @@
 out3:
 	pci_disable_device(meye.mchip_dev);
 out2:
-	kfree(meye.video_dev);
+	video_device_release(meye.video_dev);
 	meye.video_dev = NULL;
 
 	sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0);
-- 
Stelian Pop <stelian@popies.net>

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

only message in thread, other threads:[~2003-10-26 16:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-26 16:47 [PATCH 2.4.23-pre8] 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