projects
/
profile
/
ivi
/
kernel-adaptation-intel-automotive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[profile/ivi/kernel-adaptation-intel-automotive.git]
/
drivers
/
media
/
video
/
w9968cf.h
diff --git
a/drivers/media/video/w9968cf.h
b/drivers/media/video/w9968cf.h
index
30032e1
..
73ad864
100644
(file)
--- a/
drivers/media/video/w9968cf.h
+++ b/
drivers/media/video/w9968cf.h
@@
-33,6
+33,7
@@
#include <linux/rwsem.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
#include <linux/mutex.h>
+#include <media/v4l2-device.h>
#include <media/ovcamchip.h>
#include "w9968cf_vpp.h"
#include <media/ovcamchip.h>
#include "w9968cf_vpp.h"
@@
-42,7
+43,6
@@
* Default values *
****************************************************************************/
* Default values *
****************************************************************************/
-#define W9968CF_OVMOD_LOAD 1 /* automatic 'ovcamchip' module loading */
#define W9968CF_VPPMOD_LOAD 1 /* automatic 'w9968cf-vpp' module loading */
/* Comment/uncomment the following line to enable/disable debugging messages */
#define W9968CF_VPPMOD_LOAD 1 /* automatic 'w9968cf-vpp' module loading */
/* Comment/uncomment the following line to enable/disable debugging messages */
@@
-134,7
+134,7
@@
static const struct w9968cf_format w9968cf_formatlist[] = {
#define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \
"Dual Mode Camera Chip"
#define W9968CF_MODULE_NAME "V4L driver for W996[87]CF JPEG USB " \
"Dual Mode Camera Chip"
-#define W9968CF_MODULE_VERSION "1:1.3
3
-basic"
+#define W9968CF_MODULE_VERSION "1:1.3
4
-basic"
#define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia"
#define W9968CF_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>"
#define W9968CF_MODULE_LICENSE "GPL"
#define W9968CF_MODULE_AUTHOR "(C) 2002-2004 Luca Risolia"
#define W9968CF_AUTHOR_EMAIL "<luca.risolia@studio.unibo.it>"
#define W9968CF_MODULE_LICENSE "GPL"
@@
-195,10
+195,9
@@
enum w9968cf_vpp_flag {
/* Main device driver structure */
struct w9968cf_device {
/* Main device driver structure */
struct w9968cf_device {
- struct device dev; /* device structure */
-
enum w9968cf_model_id id; /* private device identifier */
enum w9968cf_model_id id; /* private device identifier */
+ struct v4l2_device v4l2_dev;
struct video_device* v4ldev; /* -> V4L structure */
struct list_head v4llist; /* entry of the list of V4L cameras */
struct video_device* v4ldev; /* -> V4L structure */
struct list_head v4llist; /* entry of the list of V4L cameras */
@@
-265,7
+264,7
@@
struct w9968cf_device {
/* I2C interface to kernel */
struct i2c_adapter i2c_adapter;
/* I2C interface to kernel */
struct i2c_adapter i2c_adapter;
- struct
i2c_client* sensor_client
;
+ struct
v4l2_subdev *sensor_sd
;
/* Locks */
struct mutex dev_mutex, /* for probe, disconnect,open and close */
/* Locks */
struct mutex dev_mutex, /* for probe, disconnect,open and close */
@@
-277,6
+276,11
@@
struct w9968cf_device {
char command[16]; /* name of the program holding the device */
};
char command[16]; /* name of the program holding the device */
};
+static inline struct w9968cf_device *to_cam(struct v4l2_device *v4l2_dev)
+{
+ return container_of(v4l2_dev, struct w9968cf_device, v4l2_dev);
+}
+
/****************************************************************************
* Macros for debugging *
/****************************************************************************
* Macros for debugging *
@@
-291,14
+295,14
@@
struct w9968cf_device {
if ( ((specific_debug) && (debug == (level))) || \
((!specific_debug) && (debug >= (level))) ) { \
if ((level) == 1) \
if ( ((specific_debug) && (debug == (level))) || \
((!specific_debug) && (debug >= (level))) ) { \
if ((level) == 1) \
-
dev_err(&cam->dev, fmt "\n", ## args);
\
+
v4l2_err(&cam->v4l2_dev, fmt "\n", ## args);
\
else if ((level) == 2 || (level) == 3) \
else if ((level) == 2 || (level) == 3) \
-
dev_info(&cam->dev, fmt "\n", ## args);
\
+
v4l2_info(&cam->v4l2_dev, fmt "\n", ## args);
\
else if ((level) == 4) \
else if ((level) == 4) \
-
dev_warn(&cam->dev, fmt "\n", ## args);
\
+
v4l2_warn(&cam->v4l2_dev, fmt "\n", ## args);
\
else if ((level) >= 5) \
else if ((level) >= 5) \
-
dev_info(&cam->dev, "[%s:%d] " fmt "\n",
\
- __func__, __LINE__ , ## args); \
+
v4l2_info(&cam->v4l2_dev, "[%s:%d] " fmt "\n",
\
+ __func__, __LINE__ , ## args);
\
} \
}
/* For generic kernel (not device specific) messages */
} \
}
/* For generic kernel (not device specific) messages */
@@
-321,7
+325,7
@@
struct w9968cf_device {
#undef PDBG
#define PDBG(fmt, args...) \
#undef PDBG
#define PDBG(fmt, args...) \
-
dev_info(&cam->
dev, "[%s:%d] " fmt "\n", __func__, __LINE__ , ## args);
+
v4l2_info(&cam->v4l2_
dev, "[%s:%d] " fmt "\n", __func__, __LINE__ , ## args);
#undef PDBGG
#define PDBGG(fmt, args...) do {;} while(0); /* nothing: it's a placeholder */
#undef PDBGG
#define PDBGG(fmt, args...) do {;} while(0); /* nothing: it's a placeholder */