diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2017-12-17 10:40:44 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-19 07:17:11 -0500 |
commit | b5472c12facb001145ade0bd69c80def36331f28 (patch) | |
tree | 124e098223b8b5e514b7555d0c151d151f8e4698 | |
parent | 25ac563abf3453339ca1db2bd35d42e47d9993b1 (diff) |
media: ddbridge: deduplicate calls to dvb_ca_en50221_init()
All CI types do dvb_ca_en50221_init() with the same arguments. Move this
call after the switch-case to remove the repetition in every case block.
Cc: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-ci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-ci.c b/drivers/media/pci/ddbridge/ddbridge-ci.c index a4fd747763a0..8dfbc3bbd86d 100644 --- a/drivers/media/pci/ddbridge/ddbridge-ci.c +++ b/drivers/media/pci/ddbridge/ddbridge-ci.c @@ -327,8 +327,6 @@ int ddb_ci_attach(struct ddb_port *port, u32 bitrate) port->en = cxd2099_attach(&cxd_cfg, port, &port->i2c->adap); if (!port->en) return -ENODEV; - dvb_ca_en50221_init(port->dvb[0].adap, - port->en, 0, 1); break; case DDB_CI_EXTERNAL_XO2: @@ -336,15 +334,15 @@ int ddb_ci_attach(struct ddb_port *port, u32 bitrate) ci_xo2_attach(port); if (!port->en) return -ENODEV; - dvb_ca_en50221_init(port->dvb[0].adap, port->en, 0, 1); break; case DDB_CI_INTERNAL: ci_attach(port); if (!port->en) return -ENODEV; - dvb_ca_en50221_init(port->dvb[0].adap, port->en, 0, 1); break; } + + dvb_ca_en50221_init(port->dvb[0].adap, port->en, 0, 1); return 0; } |