mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
clean up ci attach and detach
This commit is contained in:
parent
642a010be6
commit
caa1dbecce
@ -325,26 +325,21 @@ int ddb_ci_attach(struct ddb_port *port, u32 bitrate)
|
||||
case DDB_CI_EXTERNAL_SONY:
|
||||
cxd_cfg.bitrate = 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:
|
||||
case DDB_CI_EXTERNAL_XO2_B:
|
||||
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;
|
||||
default:
|
||||
return -ENODEV;
|
||||
}
|
||||
if (!port->en)
|
||||
return -ENODEV;
|
||||
dvb_ca_en50221_init(port->dvb[0].adap, port->en, 0, 1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2264,7 +2264,7 @@ void ddb_ports_detach(struct ddb *dev)
|
||||
dvb_unregister_device(port->dvb[0].dev);
|
||||
if (port->en) {
|
||||
dvb_ca_en50221_release(port->en);
|
||||
kfree(port->en);
|
||||
kfree(port->en->data);
|
||||
port->en = NULL;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user