aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-01-05 15:08:05 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:05:07 -0500
commit73c993a8294077ae1b724286da8ac323c25d90db (patch)
tree47a44433e6c1c2e3d4ba4fd5d557adb321a094e1 /drivers/media/video
parent8c70017f5793e68ea48085a65008d713c9a85dde (diff)
V4L/DVB (7045): xc5000: Small amount of cleanup and commenting
xc5000: Small amount of cleanup and commenting, just for clarification. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c6
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c7
-rw-r--r--drivers/media/video/cx23885/cx23885.h2
-rw-r--r--drivers/media/video/cx88/cx88-cards.c7
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c3
-rw-r--r--drivers/media/video/tuner-core.c2
6 files changed, 10 insertions, 17 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ee3f1b09914..2d414dad5c3 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -247,9 +247,9 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
247/* Tuner callback function for cx23885 boards. Currently only needed 247/* Tuner callback function for cx23885 boards. Currently only needed
248 * for HVR1500Q, which has an xc5000 tuner. 248 * for HVR1500Q, which has an xc5000 tuner.
249 */ 249 */
250int cx23885_tuner_callback(void *i2c_bus, int command, int arg) 250int cx23885_tuner_callback(void *priv, int command, int arg)
251{ 251{
252 struct cx23885_i2c *bus = i2c_bus; 252 struct cx23885_i2c *bus = priv;
253 struct cx23885_dev *dev = bus->dev; 253 struct cx23885_dev *dev = bus->dev;
254 254
255 switch(dev->board) { 255 switch(dev->board) {
@@ -271,7 +271,7 @@ int cx23885_tuner_callback(void *i2c_bus, int command, int arg)
271 271
272 return 0; /* Should never be here */ 272 return 0; /* Should never be here */
273} 273}
274EXPORT_SYMBOL(cx23885_tuner_callback); 274
275void cx23885_gpio_setup(struct cx23885_dev *dev) 275void cx23885_gpio_setup(struct cx23885_dev *dev)
276{ 276{
277 switch(dev->board) { 277 switch(dev->board) {
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 61d75d04db8..ed465c007ce 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -156,7 +156,6 @@ static struct s5h1409_config hauppauge_hvr1500q_config = {
156static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { 156static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
157 .i2c_address = 0x61, 157 .i2c_address = 0x61,
158 .if_khz = 5380, 158 .if_khz = 5380,
159 /* cannot set .video_dev here, do it before attach. */
160 .tuner_callback = cx23885_tuner_callback 159 .tuner_callback = cx23885_tuner_callback
161}; 160};
162 161
@@ -282,11 +281,7 @@ static int dvb_register(struct cx23885_tsport *port)
282 &hauppauge_hvr1500q_config, 281 &hauppauge_hvr1500q_config,
283 &dev->i2c_bus[0].i2c_adap); 282 &dev->i2c_bus[0].i2c_adap);
284 if (port->dvb.frontend != NULL) { 283 if (port->dvb.frontend != NULL) {
285 /* tunerconfig.video_dev must point to 284 hauppauge_hvr1500q_tunerconfig.priv = i2c_bus;
286 * i2c_adap.algo_data
287 */
288 hauppauge_hvr1500q_tunerconfig.video_dev =
289 i2c_bus->i2c_adap.algo_data;
290 dvb_attach(xc5000_attach, port->dvb.frontend, 285 dvb_attach(xc5000_attach, port->dvb.frontend,
291 &i2c_bus->i2c_adap, 286 &i2c_bus->i2c_adap,
292 &hauppauge_hvr1500q_tunerconfig); 287 &hauppauge_hvr1500q_tunerconfig);
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index ac9a76624e9..7cb2179f262 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -393,7 +393,7 @@ extern const unsigned int cx23885_bcount;
393extern struct cx23885_subid cx23885_subids[]; 393extern struct cx23885_subid cx23885_subids[];
394extern const unsigned int cx23885_idcount; 394extern const unsigned int cx23885_idcount;
395 395
396extern int cx23885_tuner_callback(void *i2c_bus, int command, int arg); 396extern int cx23885_tuner_callback(void *priv, int command, int arg);
397extern void cx23885_card_list(struct cx23885_dev *dev); 397extern void cx23885_card_list(struct cx23885_dev *dev);
398extern int cx23885_ir_init(struct cx23885_dev *dev); 398extern int cx23885_ir_init(struct cx23885_dev *dev);
399extern void cx23885_gpio_setup(struct cx23885_dev *dev); 399extern void cx23885_gpio_setup(struct cx23885_dev *dev);
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 3ba31572c65..254290975cd 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1885,10 +1885,10 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
1885 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both * 1885 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
1886 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */ 1886 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
1887 1887
1888int cx88_tuner_callback(void *i2c_algo, int command, int arg) 1888int cx88_tuner_callback(void *priv, int command, int arg)
1889{ 1889{
1890 struct i2c_algo_bit_data *algo = i2c_algo; 1890 struct i2c_algo_bit_data *i2c_algo = priv;
1891 struct cx88_core *core = algo->data; 1891 struct cx88_core *core = i2c_algo->data;
1892 1892
1893 switch(core->boardnr) { 1893 switch(core->boardnr) {
1894 case CX88_BOARD_PINNACLE_PCTV_HD_800i: 1894 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
@@ -1898,7 +1898,6 @@ int cx88_tuner_callback(void *i2c_algo, int command, int arg)
1898 cx_clear(MO_GP0_IO, 0x00000004); 1898 cx_clear(MO_GP0_IO, 0x00000004);
1899 mdelay(200); 1899 mdelay(200);
1900 cx_set(MO_GP0_IO, 0x00000004); 1900 cx_set(MO_GP0_IO, 0x00000004);
1901 printk(KERN_ERR "xc5000: in reset for xc5000\n");
1902 mdelay(200); 1901 mdelay(200);
1903 return 0; 1902 return 0;
1904 } 1903 }
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 0246f97a998..c852efca159 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -385,7 +385,6 @@ static struct s5h1409_config pinnacle_pctv_hd_800i_config = {
385static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = { 385static struct xc5000_config pinnacle_pctv_hd_800i_tuner_config = {
386 .i2c_address = 0x64, 386 .i2c_address = 0x64,
387 .if_khz = 5380, 387 .if_khz = 5380,
388 /* cannot set .video_dev here, do it right before attach */
389 .tuner_callback = cx88_tuner_callback, 388 .tuner_callback = cx88_tuner_callback,
390}; 389};
391 390
@@ -654,7 +653,7 @@ static int dvb_register(struct cx8802_dev *dev)
654 /* tuner_config.video_dev must point to 653 /* tuner_config.video_dev must point to
655 * i2c_adap.algo_data 654 * i2c_adap.algo_data
656 */ 655 */
657 pinnacle_pctv_hd_800i_tuner_config.video_dev = 656 pinnacle_pctv_hd_800i_tuner_config.priv =
658 dev->core->i2c_adap.algo_data; 657 dev->core->i2c_adap.algo_data;
659 dvb_attach(xc5000_attach, dev->dvb.frontend, 658 dvb_attach(xc5000_attach, dev->dvb.frontend,
660 &dev->core->i2c_adap, 659 &dev->core->i2c_adap,
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 16cdeeafeb6..8e406b168d7 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -434,7 +434,7 @@ static void set_type(struct i2c_client *c, unsigned int type,
434 case TUNER_XC5000: 434 case TUNER_XC5000:
435 xc5000_cfg.i2c_address = t->i2c->addr; 435 xc5000_cfg.i2c_address = t->i2c->addr;
436 xc5000_cfg.if_khz = 5380; 436 xc5000_cfg.if_khz = 5380;
437 xc5000_cfg.video_dev = c->adapter->algo_data; 437 xc5000_cfg.priv = c->adapter->algo_data;
438 xc5000_cfg.tuner_callback = t->tuner_callback; 438 xc5000_cfg.tuner_callback = t->tuner_callback;
439 if (!xc5000_attach(&t->fe, t->i2c->adapter, &xc5000_cfg)) { 439 if (!xc5000_attach(&t->fe, t->i2c->adapter, &xc5000_cfg)) {
440 t->type = TUNER_ABSENT; 440 t->type = TUNER_ABSENT;