Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 61326
b: refs/heads/master
c: 4052fcc
h: refs/heads/master
v: v3
  • Loading branch information
Luca Risolia authored and Mauro Carvalho Chehab committed Jul 18, 2007
1 parent 1c33e56 commit 3d5b6cb
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 84 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b2ae0be9e246974db65a5bf4ccd2de328f3dede
refs/heads/master: 4052fcc7ba32ebd54cc907991cb855d909ce9d1c
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/zc0301/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config USB_ZC0301
tristate "USB ZC0301[P] Image Processor and Control Chip support"
depends on VIDEO_V4L1
depends on VIDEO_V4L2
---help---
Say Y here if you want support for cameras based on the ZC0301 or
ZC0301P Image Processors and Control Chips.
Expand Down
21 changes: 12 additions & 9 deletions trunk/drivers/media/video/zc0301/zc0301.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/rwsem.h>
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/kref.h>

#include "zc0301_sensor.h"

Expand Down Expand Up @@ -98,7 +99,7 @@ struct zc0301_module_param {
u16 frame_timeout;
};

static DECLARE_RWSEM(zc0301_disconnect);
static DECLARE_RWSEM(zc0301_dev_lock);

struct zc0301_device {
struct video_device* v4ldev;
Expand All @@ -121,12 +122,14 @@ struct zc0301_device {

struct zc0301_module_param module_param;

struct kref kref;
enum zc0301_dev_state state;
u8 users;

struct mutex dev_mutex, fileop_mutex;
struct completion probe;
struct mutex open_mutex, fileop_mutex;
spinlock_t queue_lock;
wait_queue_head_t open, wait_frame, wait_stream;
wait_queue_head_t wait_open, wait_frame, wait_stream;
};

/*****************************************************************************/
Expand Down Expand Up @@ -156,8 +159,8 @@ do { \
else if ((level) == 2) \
dev_info(&cam->usbdev->dev, fmt "\n", ## args); \
else if ((level) >= 3) \
dev_info(&cam->usbdev->dev, "[%s:%d] " fmt "\n", \
__FUNCTION__, __LINE__ , ## args); \
dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", \
__FILE__, __FUNCTION__, __LINE__ , ## args); \
} \
} while (0)
# define KDBG(level, fmt, args...) \
Expand All @@ -166,8 +169,8 @@ do { \
if ((level) == 1 || (level) == 2) \
pr_info("zc0301: " fmt "\n", ## args); \
else if ((level) == 3) \
pr_debug("zc0301: [%s:%d] " fmt "\n", __FUNCTION__, \
__LINE__ , ## args); \
pr_debug("sn9c102: [%s:%s:%d] " fmt "\n", __FILE__, \
__FUNCTION__, __LINE__ , ## args); \
} \
} while (0)
# define V4LDBG(level, name, cmd) \
Expand All @@ -183,8 +186,8 @@ do { \

#undef PDBG
#define PDBG(fmt, args...) \
dev_info(&cam->usbdev->dev, "[%s:%d] " fmt "\n", \
__FUNCTION__, __LINE__ , ## args)
dev_info(&cam->usbdev->dev, "[%s:%s:%d] " fmt "\n", __FILE__, __FUNCTION__, \
__LINE__ , ## args)

#undef PDBGG
#define PDBGG(fmt, args...) do {;} while(0) /* placeholder */
Expand Down
Loading

0 comments on commit 3d5b6cb

Please sign in to comment.