aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJemma Denson <jdenson@gmail.com>2015-05-15 14:40:29 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-18 16:48:13 -0400
commitcf4f8114794cce3ccbf038c8ebcc16392caac485 (patch)
treeef10e306beb392597984c1bb7ef17bfa9ddabebf
parent4133601c31adcbcd3affc40e1035c25787cc5cd1 (diff)
[media] b2c2: Reset no_base_addr on skystarS2 attach failure
If set, all the other drivers reset no_base_addr on failure to attach - git commit for this being added to some of them seems to be eccd15aad72f774b2059f708bc422dbb8493bb30 This driver has been floating around outside the mainline for so long it hasn't had this fix, so add it in. Whilst here tidy surrounding code to fix style issues. Signed-off-by: Jemma Denson <jdenson@gmail.com> Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/common/b2c2/flexcop-fe-tuner.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c
index 9305266d0ac0..2426062fcb3c 100644
--- a/drivers/media/common/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c
@@ -637,15 +637,16 @@ static int skystarS2_rev33_attach(struct flexcop_device *fc,
637 struct i2c_adapter *i2c) 637 struct i2c_adapter *i2c)
638{ 638{
639 fc->fe = dvb_attach(cx24120_attach, 639 fc->fe = dvb_attach(cx24120_attach,
640 &skystar2_rev3_3_cx24120_config, i2c); 640 &skystar2_rev3_3_cx24120_config, i2c);
641 if (fc->fe == NULL) 641 if (!fc->fe)
642 return 0; 642 return 0;
643 643
644 fc->dev_type = FC_SKYS2_REV33; 644 fc->dev_type = FC_SKYS2_REV33;
645 fc->fc_i2c_adap[2].no_base_addr = 1; 645 fc->fc_i2c_adap[2].no_base_addr = 1;
646 if ((dvb_attach(isl6421_attach, fc->fe, 646 if (!dvb_attach(isl6421_attach, fc->fe, &fc->fc_i2c_adap[2].i2c_adap,
647 &fc->fc_i2c_adap[2].i2c_adap, 0x08, 0, 0, false) == NULL)) { 647 0x08, 0, 0, false)) {
648 err("ISL6421 could NOT be attached!"); 648 err("ISL6421 could NOT be attached!");
649 fc->fc_i2c_adap[2].no_base_addr = 0;
649 return 0; 650 return 0;
650 } 651 }
651 info("ISL6421 successfully attached."); 652 info("ISL6421 successfully attached.");