diff options
author | Daniel Scheller | 2017-07-03 19:21:00 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-07-20 19:05:05 +0200 |
commit | 76103bac71580090aef05a6dd22d25159da04089 (patch) | |
tree | 9c1bb1fa6fea171d5571f6d0b145c231cd15b43e /drivers/media/pci/ddbridge | |
parent | media: dvb-frontends: add ST STV6111 DVB-S/S2 tuner frontend driver (diff) | |
download | kernel-qcow2-linux-76103bac71580090aef05a6dd22d25159da04089.tar.gz kernel-qcow2-linux-76103bac71580090aef05a6dd22d25159da04089.tar.xz kernel-qcow2-linux-76103bac71580090aef05a6dd22d25159da04089.zip |
media: ddbridge: return stv09xx id in port_has_stv0900_aa()
The returned value is required for further evaluation of the exact
demodulator chip (stv090x or stv0910).
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Tested-by: Richard Scobie <r.scobie@clear.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/ddbridge')
-rw-r--r-- | drivers/media/pci/ddbridge/ddbridge-core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index cd1723e79a07..3fbac7bee2d4 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -1480,10 +1480,9 @@ static int port_has_stv0900(struct ddb_port *port) return 1; } -static int port_has_stv0900_aa(struct ddb_port *port) +static int port_has_stv0900_aa(struct ddb_port *port, u8 *id) { - u8 val; - if (i2c_read_reg16(&port->i2c->adap, 0x68, 0xf100, &val) < 0) + if (i2c_read_reg16(&port->i2c->adap, 0x68, 0xf100, id) < 0) return 0; return 1; } @@ -1530,7 +1529,7 @@ static void ddb_port_probe(struct ddb_port *port) { struct ddb *dev = port->dev; char *modname = "NO MODULE"; - u8 xo2_type, xo2_id, cxd_id; + u8 xo2_type, xo2_id, cxd_id, stv_id; port->class = DDB_PORT_NONE; @@ -1622,7 +1621,7 @@ static void ddb_port_probe(struct ddb_port *port) port->class = DDB_PORT_TUNER; port->type = DDB_TUNER_DVBS_ST; ddbwritel(I2C_SPEED_100, port->i2c->regs + I2C_TIMING); - } else if (port_has_stv0900_aa(port)) { + } else if (port_has_stv0900_aa(port, &stv_id)) { modname = "DUAL DVB-S2"; port->class = DDB_PORT_TUNER; port->type = DDB_TUNER_DVBS_ST_AA; |