diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-01-17 12:17:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:42:22 -0300 |
commit | fac6986c4777ae85fa2108ea25fee98de2c1f7b2 (patch) | |
tree | 477119cf15d50bcc548ddd6e6ba15eb69e311d23 /drivers/media/video/saa7134/saa7134.h | |
parent | V4L/DVB (10246): saa6752hs: convert to v4l2_subdev. (diff) | |
download | linux-dev-fac6986c4777ae85fa2108ea25fee98de2c1f7b2.tar.xz linux-dev-fac6986c4777ae85fa2108ea25fee98de2c1f7b2.zip |
V4L/DVB (10247): saa7134: convert to the new v4l2 framework.
Register v4l2_device and switch to v4l2_subdev to access the i2c modules.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134.h')
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 14ee265f3374..bb6952118d01 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h @@ -35,6 +35,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> +#include <media/v4l2-device.h> #include <media/tuner.h> #include <media/ir-common.h> #include <media/ir-kbd-i2c.h> @@ -482,6 +483,7 @@ struct saa7134_dev { struct mutex lock; spinlock_t slock; struct v4l2_prio_state prio; + struct v4l2_device v4l2_dev; /* workstruct for loading modules */ struct work_struct request_module_wk; @@ -572,7 +574,6 @@ struct saa7134_dev { enum saa7134_ts_status ts_state; unsigned int buff_cnt; struct saa7134_mpeg_ops *mops; - struct i2c_client *mpeg_i2c_client; /* SAA7134_MPEG_EMPRESS only */ struct video_device *empress_dev; @@ -616,6 +617,12 @@ struct saa7134_dev { V4L2_STD_NTSC | V4L2_STD_PAL_M | \ V4L2_STD_PAL_60) +#define GRP_EMPRESS (1) +#define saa_call_all(dev, o, f, args...) \ + v4l2_device_call_all(&(dev)->v4l2_dev, 0, o, f , ##args) +#define saa_call_empress(dev, o, f, args...) \ + v4l2_device_call_until_err(&(dev)->v4l2_dev, GRP_EMPRESS, o, f , ##args) + /* ----------------------------------------------------------- */ /* saa7134-core.c */ @@ -668,10 +675,6 @@ int saa7134_tuner_callback(void *priv, int component, int command, int arg); int saa7134_i2c_register(struct saa7134_dev *dev); int saa7134_i2c_unregister(struct saa7134_dev *dev); -void saa7134_i2c_call_clients(struct saa7134_dev *dev, - unsigned int cmd, void *arg); -int saa7134_i2c_call_saa6752(struct saa7134_dev *dev, - unsigned int cmd, void *arg); /* ----------------------------------------------------------- */ |