simplify link structure access

This commit is contained in:
Ralph Metzler 2018-05-14 04:26:51 +02:00
parent 6243397d99
commit 5d7f4fcbe8
1 changed files with 7 additions and 6 deletions

View File

@ -2005,6 +2005,7 @@ static void ddb_port_probe(struct ddb_port *port)
{ {
struct ddb *dev = port->dev; struct ddb *dev = port->dev;
u32 l = port->lnr; u32 l = port->lnr;
struct ddb_link *link = &dev->link[l];
u8 id, type; u8 id, type;
port->name = "NO MODULE"; port->name = "NO MODULE";
@ -2014,7 +2015,7 @@ static void ddb_port_probe(struct ddb_port *port)
/* Handle missing ports and ports without I2C */ /* Handle missing ports and ports without I2C */
if (dummy_tuner && !port->nr && if (dummy_tuner && !port->nr &&
dev->link[l].ids.device == 0x0005) { link->ids.device == 0x0005) {
port->name = "DUMMY"; port->name = "DUMMY";
port->class = DDB_PORT_TUNER; port->class = DDB_PORT_TUNER;
port->type = DDB_TUNER_DUMMY; port->type = DDB_TUNER_DUMMY;
@ -2029,7 +2030,7 @@ static void ddb_port_probe(struct ddb_port *port)
} }
if (port->nr == 1 && dev->link[l].info->type == DDB_OCTOPUS_CI && if (port->nr == 1 && dev->link[l].info->type == DDB_OCTOPUS_CI &&
dev->link[l].info->i2c_mask == 1) { link->info->i2c_mask == 1) {
port->name = "NO TAB"; port->name = "NO TAB";
port->class = DDB_PORT_NONE; port->class = DDB_PORT_NONE;
return; return;
@ -2041,7 +2042,7 @@ static void ddb_port_probe(struct ddb_port *port)
return; return;
} }
#if 0 #if 0
if (dev->link[l].info->type == DDB_OCTOPRO_HDIN) { if (link->info->type == DDB_OCTOPRO_HDIN) {
if (port->nr == 0) { if (port->nr == 0) {
dev->link[l].info->type = DDB_OCTOPUS; dev->link[l].info->type = DDB_OCTOPUS;
port->name = "HDIN"; port->name = "HDIN";
@ -2050,7 +2051,7 @@ static void ddb_port_probe(struct ddb_port *port)
return; return;
} }
#endif #endif
if (dev->link[l].info->type == DDB_OCTOPUS_MAX) { if (link->info->type == DDB_OCTOPUS_MAX) {
port->name = "DUAL DVB-S2 MAX"; port->name = "DUAL DVB-S2 MAX";
port->type_name = "MXL5XX"; port->type_name = "MXL5XX";
port->class = DDB_PORT_TUNER; port->class = DDB_PORT_TUNER;
@ -2071,7 +2072,7 @@ static void ddb_port_probe(struct ddb_port *port)
return; return;
} }
if (port->nr > 1 && dev->link[l].info->type == DDB_OCTOPUS_CI) { if (port->nr > 1 && link->info->type == DDB_OCTOPUS_CI) {
port->name = "CI internal"; port->name = "CI internal";
port->type_name = "INTERNAL"; port->type_name = "INTERNAL";
port->class = DDB_PORT_CI; port->class = DDB_PORT_CI;
@ -2156,7 +2157,7 @@ static void ddb_port_probe(struct ddb_port *port)
port->class = DDB_PORT_TUNER; port->class = DDB_PORT_TUNER;
if (id == 0x51) { if (id == 0x51) {
if (port->nr == 0 && if (port->nr == 0 &&
dev->link[l].info->ts_quirks & TS_QUIRK_REVERSED) link->info->ts_quirks & TS_QUIRK_REVERSED)
port->type = DDB_TUNER_DVBS_STV0910_PR; port->type = DDB_TUNER_DVBS_STV0910_PR;
else else
port->type = DDB_TUNER_DVBS_STV0910_P; port->type = DDB_TUNER_DVBS_STV0910_P;