X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fw9968cf.h;fp=drivers%2Fusb%2Fmedia%2Fw9968cf.h;h=ec7696e8f1fac3eaf3b47725c37db3ec1dde8154;hb=a2f44b27303a5353859d77a3e96a1d3f33f56ab7;hp=47a6ff7941712300dd492b2127b1b8243d47aa63;hpb=134734d875a0a48d994ef20b9905209b4b8b6f75;p=linux-2.6.git diff --git a/drivers/usb/media/w9968cf.h b/drivers/media/video/w9968cf.h similarity index 94% rename from drivers/usb/media/w9968cf.h rename to drivers/media/video/w9968cf.h index 47a6ff794..ec7696e8f 100644 --- a/drivers/usb/media/w9968cf.h +++ b/drivers/media/video/w9968cf.h @@ -28,11 +28,10 @@ #include #include #include -#include #include #include #include -#include +#include #include @@ -61,7 +60,7 @@ /* Maximum data payload sizes in bytes for alternate settings */ static const u16 wMaxPacketSize[] = {1023, 959, 895, 831, 767, 703, 639, 575, - 511, 447, 383, 319, 255, 191, 127, 63}; + 511, 447, 383, 319, 255, 191, 127, 63}; #define W9968CF_PACKET_SIZE 1023 /* according to wMaxPacketSizes[] */ #define W9968CF_MIN_PACKET_SIZE 63 /* minimum value */ #define W9968CF_ISO_PACKETS 5 /* n.of packets for isochronous transfers */ @@ -134,7 +133,7 @@ static const struct w9968cf_format w9968cf_formatlist[] = { ****************************************************************************/ #define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \ - "Dual Mode Camera Chip" + "Dual Mode Camera Chip" #define W9968CF_MODULE_VERSION "1:1.33-basic" #define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia" #define W9968CF_AUTHOR_EMAIL "" @@ -194,14 +193,6 @@ enum w9968cf_vpp_flag { VPP_UYVY_TO_RGBX = 0x08, }; -static struct w9968cf_vpp_t* w9968cf_vpp; -static DECLARE_WAIT_QUEUE_HEAD(w9968cf_vppmod_wait); - -static LIST_HEAD(w9968cf_dev_list); /* head of V4L registered cameras list */ -static DECLARE_MUTEX(w9968cf_devlist_sem); /* semaphore for list traversal */ - -static DECLARE_RWSEM(w9968cf_disconnect); /* prevent races with open() */ - /* Main device driver structure */ struct w9968cf_device { struct device dev; /* device structure */ @@ -277,10 +268,10 @@ struct w9968cf_device { struct i2c_client* sensor_client; /* Locks */ - struct semaphore dev_sem, /* for probe, disconnect,open and close */ - fileop_sem; /* for read and ioctl */ + struct mutex dev_mutex, /* for probe, disconnect,open and close */ + fileop_mutex; /* for read and ioctl */ spinlock_t urb_lock, /* for submit_urb() and unlink_urb() */ - flist_lock; /* for requested frame list accesses */ + flist_lock; /* for requested frame list accesses */ wait_queue_head_t open, wait_queue; char command[16]; /* name of the program holding the device */ @@ -307,7 +298,7 @@ struct w9968cf_device { dev_warn(&cam->dev, fmt "\n", ## args); \ else if ((level) >= 5) \ dev_info(&cam->dev, "[%s:%d] " fmt "\n", \ - __FUNCTION__, __LINE__ , ## args); \ + __FUNCTION__, __LINE__ , ## args); \ } \ } /* For generic kernel (not device specific) messages */ @@ -319,7 +310,7 @@ struct w9968cf_device { pr_info("w9968cf: " fmt "\n", ## args); \ else if ((level) >= 5) \ pr_debug("w9968cf: [%s:%d] " fmt "\n", __FUNCTION__, \ - __LINE__ , ## args); \ + __LINE__ , ## args); \ } \ } #else