summaryrefslogtreecommitdiff
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorMichel Ludwig <michel.ludwig@gmail.com>2007-11-16 13:46:14 +0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-26 00:02:14 +0300
commita37b4c9bc87a74ed5003c385eae264fc0acf6b35 (patch)
tree50ac0d83aebd44f94b357592a22242f11716f7b9 /drivers/media/video/tuner-core.c
parent2fc580ffeb551066f769934e3a4717d721d0a559 (diff)
downloadlinux-a37b4c9bc87a74ed5003c385eae264fc0acf6b35.tar.xz
V4L/DVB (6611): Change xc2028_attach method to make easier for DVB
Removes uneeded parameters and adds an structure for passing the parameters This patch is co-authored by Mauro Carvalho Chehab. Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com> 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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 1b0d28a0ca78..e56a41941489 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -336,10 +336,13 @@ static void set_type(struct i2c_client *c, unsigned int type,
break;
case TUNER_XC2028:
{
- int rc=xc2028_attach(&t->fe, t->i2c->adapter, t->i2c->addr,
- &c->dev, c->adapter->algo_data,
- t->tuner_callback);
- if (rc<0) {
+ struct xc2028_config cfg = {
+ .i2c_adap = t->i2c->adapter,
+ .i2c_addr = t->i2c->addr,
+ .video_dev = c->adapter->algo_data,
+ .callback = t->tuner_callback,
+ };
+ if (!xc2028_attach(&t->fe, &cfg)) {
t->type = TUNER_ABSENT;
t->mode_mask = T_UNINITIALIZED;
return;