meye driver update
Subsystems (2)
PATCH 1/1 meye driver update
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 =====
Documentation/video4linux/meye.txt +5 -0
@@ -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 =====
drivers/media/video/meye.h +1 -3
@@ -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 =====
drivers/media/video/meye.c +7 -5
@@ -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 );
Signature · 1 line
Stelian Pop <[email protected]>