aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-17 10:17:14 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:22 -0400
commitfac6986c4777ae85fa2108ea25fee98de2c1f7b2 (patch)
tree477119cf15d50bcc548ddd6e6ba15eb69e311d23 /drivers/media/video/saa7134/saa7134.h
parent5b73e98c83fc5087f591c9b12ee546b97e9283d4 (diff)
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.h13
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 @@
35 35
36#include <media/v4l2-common.h> 36#include <media/v4l2-common.h>
37#include <media/v4l2-ioctl.h> 37#include <media/v4l2-ioctl.h>
38#include <media/v4l2-device.h>
38#include <media/tuner.h> 39#include <media/tuner.h>
39#include <media/ir-common.h> 40#include <media/ir-common.h>
40#include <media/ir-kbd-i2c.h> 41#include <media/ir-kbd-i2c.h>
@@ -482,6 +483,7 @@ struct saa7134_dev {
482 struct mutex lock; 483 struct mutex lock;
483 spinlock_t slock; 484 spinlock_t slock;
484 struct v4l2_prio_state prio; 485 struct v4l2_prio_state prio;
486 struct v4l2_device v4l2_dev;
485 /* workstruct for loading modules */ 487 /* workstruct for loading modules */
486 struct work_struct request_module_wk; 488 struct work_struct request_module_wk;
487 489
@@ -572,7 +574,6 @@ struct saa7134_dev {
572 enum saa7134_ts_status ts_state; 574 enum saa7134_ts_status ts_state;
573 unsigned int buff_cnt; 575 unsigned int buff_cnt;
574 struct saa7134_mpeg_ops *mops; 576 struct saa7134_mpeg_ops *mops;
575 struct i2c_client *mpeg_i2c_client;
576 577
577 /* SAA7134_MPEG_EMPRESS only */ 578 /* SAA7134_MPEG_EMPRESS only */
578 struct video_device *empress_dev; 579 struct video_device *empress_dev;
@@ -616,6 +617,12 @@ struct saa7134_dev {
616 V4L2_STD_NTSC | V4L2_STD_PAL_M | \ 617 V4L2_STD_NTSC | V4L2_STD_PAL_M | \
617 V4L2_STD_PAL_60) 618 V4L2_STD_PAL_60)
618 619
620#define GRP_EMPRESS (1)
621#define saa_call_all(dev, o, f, args...) \
622 v4l2_device_call_all(&(dev)->v4l2_dev, 0, o, f , ##args)
623#define saa_call_empress(dev, o, f, args...) \
624 v4l2_device_call_until_err(&(dev)->v4l2_dev, GRP_EMPRESS, o, f , ##args)
625
619/* ----------------------------------------------------------- */ 626/* ----------------------------------------------------------- */
620/* saa7134-core.c */ 627/* saa7134-core.c */
621 628
@@ -668,10 +675,6 @@ int saa7134_tuner_callback(void *priv, int component, int command, int arg);
668 675
669int saa7134_i2c_register(struct saa7134_dev *dev); 676int saa7134_i2c_register(struct saa7134_dev *dev);
670int saa7134_i2c_unregister(struct saa7134_dev *dev); 677int saa7134_i2c_unregister(struct saa7134_dev *dev);
671void saa7134_i2c_call_clients(struct saa7134_dev *dev,
672 unsigned int cmd, void *arg);
673int saa7134_i2c_call_saa6752(struct saa7134_dev *dev,
674 unsigned int cmd, void *arg);
675 678
676 679
677/* ----------------------------------------------------------- */ 680/* ----------------------------------------------------------- */