Commit 2d39d7cf authored by Stelian Pop's avatar Stelian Pop Committed by Linus Torvalds

[PATCH] meye: whitespace and coding style cleanups

Signed-off-by: default avatarStelian Pop <stelian@popies.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 773f7f2f
Vaio Picturebook Motion Eye Camera Driver Readme Vaio Picturebook Motion Eye Camera Driver Readme
------------------------------------------------ ------------------------------------------------
Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
Copyright (C) 2001-2002 Alcôve <www.alcove.com> Copyright (C) 2001-2002 Alcôve <www.alcove.com>
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enable the use of video4linux compatible applications with the This driver enable the use of video4linux compatible applications with the
Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O
Control Device" driver (which can be found in the "Character drivers" Control Device" driver (which can be found in the "Character drivers"
section of the kernel configuration utility) to be compiled and installed section of the kernel configuration utility) to be compiled and installed
(using its "camera=1" parameter). (using its "camera=1" parameter).
...@@ -24,7 +24,7 @@ This driver supports the 'second' version of the MotionEye camera :) ...@@ -24,7 +24,7 @@ This driver supports the 'second' version of the MotionEye camera :)
The first version was connected directly on the video bus of the Neomagic The first version was connected directly on the video bus of the Neomagic
video card and is unsupported. video card and is unsupported.
The second one, made by Kawasaki Steel is fully supported by this The second one, made by Kawasaki Steel is fully supported by this
driver (PCI vendor/device is 0x136b/0xff01) driver (PCI vendor/device is 0x136b/0xff01)
The third one, present in recent (more or less last year) Picturebooks The third one, present in recent (more or less last year) Picturebooks
...@@ -116,7 +116,7 @@ Private API: ...@@ -116,7 +116,7 @@ Private API:
MEYEIOC_STILLJCAPT MEYEIOC_STILLJCAPT
Takes a snapshot in an uncompressed or compressed jpeg format. Takes a snapshot in an uncompressed or compressed jpeg format.
This ioctl blocks until the snapshot is done and returns (for This ioctl blocks until the snapshot is done and returns (for
jpeg snapshot) the size of the image. The image data is jpeg snapshot) the size of the image. The image data is
available from the first mmap'ed buffer. available from the first mmap'ed buffer.
Look at the 'motioneye' application code for an actual example. Look at the 'motioneye' application code for an actual example.
......
This diff is collapsed.
/* /*
* Motion Eye video4linux driver for Sony Vaio PictureBook * Motion Eye video4linux driver for Sony Vaio PictureBook
* *
* Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net>
* *
* Copyright (C) 2001-2002 Alcve <www.alcove.com> * Copyright (C) 2001-2002 Alcve <www.alcove.com>
* *
* Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
* *
* Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras. * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
* *
* Some parts borrowed from various video4linux drivers, especially * Some parts borrowed from various video4linux drivers, especially
* bttv-driver.c and zoran.c, see original files for credits. * bttv-driver.c and zoran.c, see original files for credits.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef _MEYE_PRIV_H_ #ifndef _MEYE_PRIV_H_
#define _MEYE_PRIV_H_ #define _MEYE_PRIV_H_
#define MEYE_DRIVER_MAJORVERSION 1 #define MEYE_DRIVER_MAJORVERSION 1
#define MEYE_DRIVER_MINORVERSION 10 #define MEYE_DRIVER_MINORVERSION 10
#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ #define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
/* Motion JPEG chip PCI configuration registers */ /* Motion JPEG chip PCI configuration registers */
#define MCHIP_PCI_POWER_CSR 0x54 #define MCHIP_PCI_POWER_CSR 0x54
#define MCHIP_PCI_MCORE_STATUS 0x60 /* see HIC_STATUS */ #define MCHIP_PCI_MCORE_STATUS 0x60 /* see HIC_STATUS */
#define MCHIP_PCI_HOSTUSEREQ_SET 0x64 #define MCHIP_PCI_HOSTUSEREQ_SET 0x64
#define MCHIP_PCI_HOSTUSEREQ_CLR 0x68 #define MCHIP_PCI_HOSTUSEREQ_CLR 0x68
#define MCHIP_PCI_LOWPOWER_SET 0x6c #define MCHIP_PCI_LOWPOWER_SET 0x6c
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
#define MCHIP_MM_INTA_PCI_ERR 0x00000040 /* PCI error */ #define MCHIP_MM_INTA_PCI_ERR 0x00000040 /* PCI error */
#define MCHIP_MM_INTA_PCI_ERR_MASK 0x00004000 #define MCHIP_MM_INTA_PCI_ERR_MASK 0x00004000
#define MCHIP_MM_PT_ADDR 0x08 /* page table address */ #define MCHIP_MM_PT_ADDR 0x08 /* page table address*/
/* n*4kB */ /* n*4kB */
#define MCHIP_NB_PAGES 1024 /* pages for display */ #define MCHIP_NB_PAGES 1024 /* pages for display */
#define MCHIP_NB_PAGES_MJPEG 256 /* pages for mjpeg */ #define MCHIP_NB_PAGES_MJPEG 256 /* pages for mjpeg */
...@@ -288,33 +288,25 @@ struct meye_grab_buffer { ...@@ -288,33 +288,25 @@ struct meye_grab_buffer {
/* Motion Eye device structure */ /* Motion Eye device structure */
struct meye { struct meye {
/* mchip related */
struct pci_dev *mchip_dev; /* pci device */ struct pci_dev *mchip_dev; /* pci device */
u8 mchip_irq; /* irq */ u8 mchip_irq; /* irq */
u8 mchip_mode; /* actual mchip mode: HIC_MODE... */ u8 mchip_mode; /* actual mchip mode: HIC_MODE... */
u8 mchip_fnum; /* current mchip frame number */ u8 mchip_fnum; /* current mchip frame number */
unsigned char *mchip_mmregs; /* mchip: memory mapped registers */ unsigned char *mchip_mmregs; /* mchip: memory mapped registers */
u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */ u8 *mchip_ptable[MCHIP_NB_PAGES];/* mchip: ptable */
dma_addr_t *mchip_ptable_toc; /* mchip: ptable toc */ dma_addr_t *mchip_ptable_toc; /* mchip: ptable toc */
dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */ dma_addr_t mchip_dmahandle; /* mchip: dma handle to ptable toc */
unsigned char *grab_fbuffer; /* capture framebuffer */ unsigned char *grab_fbuffer; /* capture framebuffer */
unsigned char *grab_temp; /* temporary buffer */ unsigned char *grab_temp; /* temporary buffer */
/* list of buffers */ /* list of buffers */
struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS]; struct meye_grab_buffer grab_buffer[MEYE_MAX_BUFNBRS];
int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */ int vma_use_count[MEYE_MAX_BUFNBRS]; /* mmap count */
/* other */
struct semaphore lock; /* semaphore for open/mmap... */ struct semaphore lock; /* semaphore for open/mmap... */
struct kfifo *grabq; /* queue for buffers to be grabbed */ struct kfifo *grabq; /* queue for buffers to be grabbed */
spinlock_t grabq_lock; /* lock protecting the queue */ spinlock_t grabq_lock; /* lock protecting the queue */
struct kfifo *doneq; /* queue for grabbed buffers */ struct kfifo *doneq; /* queue for grabbed buffers */
spinlock_t doneq_lock; /* lock protecting the queue */ spinlock_t doneq_lock; /* lock protecting the queue */
wait_queue_head_t proc_list; /* wait queue */ wait_queue_head_t proc_list; /* wait queue */
struct video_device *video_dev; /* video device parameters */ struct video_device *video_dev; /* video device parameters */
struct video_picture picture; /* video picture parameters */ struct video_picture picture; /* video picture parameters */
struct meye_params params; /* additional parameters */ struct meye_params params; /* additional parameters */
......
/* /*
* Motion Eye video4linux driver for Sony Vaio PictureBook * Motion Eye video4linux driver for Sony Vaio PictureBook
* *
* Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net>
...@@ -8,20 +8,20 @@ ...@@ -8,20 +8,20 @@
* Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
* *
* Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras. * Earlier work by Werner Almesberger, Paul `Rusty' Russell and Paul Mackerras.
* *
* Some parts borrowed from various video4linux drivers, especially * Some parts borrowed from various video4linux drivers, especially
* bttv-driver.c and zoran.c, see original files for credits. * bttv-driver.c and zoran.c, see original files for credits.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment