diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-25 14:10:14 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-25 14:10:14 -0200 |
commit | 1f3f7671e12715041b3b002db1403ce4da682fda (patch) | |
tree | ab11e15908ff60882be00438005193f0ff204d2e /linux/drivers/media/video/em28xx | |
parent | 83f9b196743f52d7b3e0566287bf173fac764bd5 (diff) | |
download | mediapointer-dvb-s2-1f3f7671e12715041b3b002db1403ce4da682fda.tar.gz mediapointer-dvb-s2-1f3f7671e12715041b3b002db1403ce4da682fda.tar.bz2 |
em28xx: cleanup: We need just one tuner callback
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 29 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 2 |
2 files changed, 8 insertions, 23 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index 137ed3399..f400f80f0 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -1211,15 +1211,6 @@ static struct em28xx_reg_seq default_callback[] = { { -1, -1, -1, -1}, }; -/* Callback for EM2882 TERRATEC HYBRID XS */ -static struct em28xx_reg_seq em2882_terratec_hybrid_xs_digital[] = { - {EM28XX_R08_GPIO, 0x2e, 0xff, 6}, - {EM28XX_R08_GPIO, 0x3e, ~EM_GPIO_4, 6}, - {EM2880_R04_GPO, 0x04, 0xff, 10}, - {EM2880_R04_GPO, 0x0c, 0xff, 10}, - { -1, -1, -1, -1}, -}; - /* Pinnacle PCTV HD Mini (80e) GPIOs 0-5: not used 6: demod reset, active low @@ -1258,10 +1249,7 @@ int em28xx_tuner_callback(void *ptr, int component, int command, int arg) if (command != XC2028_TUNER_RESET) return 0; - if (dev->mode == EM28XX_ANALOG_MODE) - rc = em28xx_gpio_set(dev, dev->tun_analog_gpio); - else - rc = em28xx_gpio_set(dev, dev->tun_digital_gpio); + rc = em28xx_gpio_set(dev, dev->tuner_gpio); return rc; } @@ -1355,16 +1343,12 @@ void em28xx_pre_card_setup(struct em28xx *dev) /* Sets GPO/GPIO sequences for this device */ dev->analog_gpio = hauppauge_wintv_hvr_900_analog; dev->digital_gpio = hauppauge_wintv_hvr_900_digital; - dev->tun_analog_gpio = default_callback; - dev->tun_digital_gpio = default_callback; break; case EM2882_BOARD_TERRATEC_HYBRID_XS: /* Sets GPO/GPIO sequences for this device */ dev->analog_gpio = hauppauge_wintv_hvr_900_analog; dev->digital_gpio = hauppauge_wintv_hvr_900_digital; - dev->tun_analog_gpio = default_callback; - dev->tun_digital_gpio = em2882_terratec_hybrid_xs_digital; break; case EM2880_BOARD_TERRATEC_HYBRID_XS_FR: @@ -1381,8 +1365,6 @@ void em28xx_pre_card_setup(struct em28xx *dev) /* Sets GPO/GPIO sequences for this device */ dev->analog_gpio = default_analog; dev->digital_gpio = default_digital; - dev->tun_analog_gpio = default_callback; - dev->tun_digital_gpio = default_callback; break; case EM2880_BOARD_MSI_DIGIVOX_AD: @@ -1390,8 +1372,6 @@ void em28xx_pre_card_setup(struct em28xx *dev) /* Sets GPO/GPIO sequences for this device */ dev->analog_gpio = em2880_msi_digivox_ad_analog; dev->digital_gpio = em2880_msi_digivox_ad_digital; - dev->tun_analog_gpio = default_callback; - dev->tun_digital_gpio = default_callback; break; case EM2861_BOARD_PLEXTOR_PX_TV100U: @@ -1463,7 +1443,11 @@ void em28xx_pre_card_setup(struct em28xx *dev) break; } - em28xx_gpio_set(dev, dev->tun_analog_gpio); + /* Sets the default callback. Used only for certain tuners */ + if (!dev->tuner_gpio) + dev->tuner_gpio = default_callback; + + em28xx_gpio_set(dev, dev->tuner_gpio); em28xx_set_mode(dev, EM28XX_ANALOG_MODE); /* Unlock device */ @@ -1757,3 +1741,4 @@ void em28xx_card_setup(struct em28xx *dev) em28xx_ir_init(dev); } + diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 895a5a68f..bea105250 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -441,7 +441,7 @@ struct em28xx { struct em28xx_reg_seq *analog_gpio, *digital_gpio; /* GPIO sequences for tuner callbacks */ - struct em28xx_reg_seq *tun_analog_gpio, *tun_digital_gpio; + struct em28xx_reg_seq *tuner_gpio; struct list_head devlist; |