aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-23 14:24:06 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:01:05 -0500
commit215b95baf969c6f895969f0a4ae0479954fba7cd (patch)
tree67e02c71a7d306cb82221e674325a27221ce5e06 /drivers/media/video/tuner-core.c
parent3b20532c791399182bd04f0fcc70b60a95637fa5 (diff)
V4L/DVB (6430): Convert tuner-xc2028 driver to the newer hybrid approach
This changeset converts tuner-xc2028 to the newer hybrid approach. It also prevents creating twice the xc3028 private struct by both DVB and V4L parts. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r--drivers/media/video/tuner-core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index ce817a17ccf1..13112732ed2c 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -24,6 +24,7 @@
24#include "tda8290.h" 24#include "tda8290.h"
25#include "tea5761.h" 25#include "tea5761.h"
26#include "tea5767.h" 26#include "tea5767.h"
27#include "tuner-xc2028.h"
27#include "tuner-simple.h" 28#include "tuner-simple.h"
28 29
29#define UNSET (-1U) 30#define UNSET (-1U)
@@ -323,8 +324,17 @@ static void set_type(struct i2c_client *c, unsigned int type,
323 attach_simple_tuner(t); 324 attach_simple_tuner(t);
324 break; 325 break;
325 case TUNER_XC2028: 326 case TUNER_XC2028:
326 xc2028_tuner_init(c); 327 {
328 int rc=xc2028_attach(&t->fe, t->i2c.adapter, t->i2c.addr,
329 &c->dev, c->adapter->algo_data,
330 t->tuner_callback);
331 if (rc<0) {
332 t->type = TUNER_ABSENT;
333 t->mode_mask = T_UNINITIALIZED;
334 return;
335 }
327 break; 336 break;
337 }
328 case TUNER_TDA9887: 338 case TUNER_TDA9887:
329 tda9887_tuner_init(t); 339 tda9887_tuner_init(t);
330 break; 340 break;