diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-19 11:01:24 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-19 11:01:24 +0000 |
commit | e2dece7b3a29cf172128e7a3481940322ca5df20 (patch) | |
tree | 61be5d3df4a36c7e6684869aa3930de96ebee088 /linux/drivers/media/video/saa7134/saa7134.h | |
parent | 7987027f994d1a996d966798c87d222c639cb911 (diff) | |
download | mediapointer-dvb-s2-e2dece7b3a29cf172128e7a3481940322ca5df20.tar.gz mediapointer-dvb-s2-e2dece7b3a29cf172128e7a3481940322ca5df20.tar.bz2 |
KWorld ATSC 115 all static
From: Mauro Carvalho Chehab <mchehab@infradead.org>
saa7134: Fix tuner access on Kworld ATSC110
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134.h')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 9e3b37c73..040f447c6 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -594,6 +594,7 @@ struct saa7134_dev { int (*original_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); int (*original_set_high_voltage)(struct dvb_frontend *fe, long arg); #endif + void (*gate_ctrl)(struct saa7134_dev *dev, int open); }; /* ----------------------------------------------------------- */ @@ -623,10 +624,24 @@ struct saa7134_dev { 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) +#define saa_call_all(dev, o, f, args...) do { \ + if (dev->gate_ctrl) \ + dev->gate_ctrl(dev, 1); \ + v4l2_device_call_all(&(dev)->v4l2_dev, 0, o, f , ##args); \ + if (dev->gate_ctrl) \ + dev->gate_ctrl(dev, 0); \ +} while (0) + +#define saa_call_empress(dev, o, f, args...) ({ \ + long _rc; \ + if (dev->gate_ctrl) \ + dev->gate_ctrl(dev, 1); \ + _rc = v4l2_device_call_until_err(&(dev)->v4l2_dev, \ + GRP_EMPRESS, o, f , ##args); \ + if (dev->gate_ctrl) \ + dev->gate_ctrl(dev, 0); \ + _rc; \ +}) /* ----------------------------------------------------------- */ /* saa7134-core.c */ |