diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2018-06-23 18:36:03 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-07-30 23:23:12 +0300 |
commit | 2957e53e57f2d8a791d5d56978e194440844f186 (patch) | |
tree | 2c96490b90d5b98104f407a21dcd9588c9716605 | |
parent | 7b6b9b153ad0127ec031438e3538acdebd677b02 (diff) | |
download | linux-2957e53e57f2d8a791d5d56978e194440844f186.tar.xz |
media: ddbridge: link structure access cosmetics in ddb_port_probe()
Throughout the function, dev->link[l] is used several times. Unclutter
this a bit by declaring a ddb_link var at the top of the function, assign
the address of dev->link[l] to it and use that var to access the link[]
struct member.
Picked up from the upstream dddvb GIT.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-core.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index 55eb151f329e..408460be00b7 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -1850,6 +1850,7 @@ static void ddb_port_probe(struct ddb_port *port) { struct ddb *dev = port->dev; u32 l = port->lnr; + struct ddb_link *link = &dev->link[l]; u8 id, type; port->name = "NO MODULE"; @@ -1859,7 +1860,7 @@ static void ddb_port_probe(struct ddb_port *port) /* Handle missing ports and ports without I2C */ if (dummy_tuner && !port->nr && - dev->link[l].ids.device == 0x0005) { + link->ids.device == 0x0005) { port->name = "DUMMY"; port->class = DDB_PORT_TUNER; port->type = DDB_TUNER_DUMMY; @@ -1873,14 +1874,14 @@ static void ddb_port_probe(struct ddb_port *port) return; } - if (port->nr == 1 && dev->link[l].info->type == DDB_OCTOPUS_CI && - dev->link[l].info->i2c_mask == 1) { + if (port->nr == 1 && link->info->type == DDB_OCTOPUS_CI && + link->info->i2c_mask == 1) { port->name = "NO TAB"; port->class = DDB_PORT_NONE; return; } - if (dev->link[l].info->type == DDB_OCTOPUS_MAX) { + if (link->info->type == DDB_OCTOPUS_MAX) { port->name = "DUAL DVB-S2 MAX"; port->type_name = "MXL5XX"; port->class = DDB_PORT_TUNER; @@ -1891,8 +1892,8 @@ static void ddb_port_probe(struct ddb_port *port) return; } - if (dev->link[l].info->type == DDB_OCTOPUS_MCI) { - if (port->nr >= dev->link[l].info->mci) + if (link->info->type == DDB_OCTOPUS_MCI) { + if (port->nr >= link->info->mci) return; port->name = "DUAL MCI"; port->type_name = "MCI"; @@ -1901,7 +1902,7 @@ static void ddb_port_probe(struct ddb_port *port) 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->type_name = "INTERNAL"; port->class = DDB_PORT_CI; @@ -1986,7 +1987,7 @@ static void ddb_port_probe(struct ddb_port *port) port->class = DDB_PORT_TUNER; if (id == 0x51) { 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; else port->type = DDB_TUNER_DVBS_STV0910_P; |