diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/mt312.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/mt312.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/mt312.c b/linux/drivers/media/dvb/frontends/mt312.c index 9f9b6736e..9ea6c2ccd 100644 --- a/linux/drivers/media/dvb/frontends/mt312.c +++ b/linux/drivers/media/dvb/frontends/mt312.c @@ -149,8 +149,8 @@ int mt312_pll_write(struct dvb_i2c_bus *i2c, const u8 addr, u8 *buf, const u8 le msg.addr = addr; msg.flags = 0; - msg.buf = buf; - msg.len = len; + msg.buf = buf; + msg.len = len; if ((ret = mt312_writereg(i2c, GPP_CTRL, 0x40)) < 0) return ret; @@ -613,7 +613,10 @@ int mt312_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg) return mt312_send_master_cmd(i2c, arg); case FE_DISEQC_RECV_SLAVE_REPLY: - return mt312_recv_slave_reply(i2c, arg); + if ((long)fe->data == ID_MT312) + return mt312_recv_slave_reply(i2c, arg); + else + return -EOPNOTSUPP; case FE_DISEQC_SEND_BURST: return mt312_send_burst(i2c, (fe_sec_mini_cmd_t) arg); @@ -676,10 +679,10 @@ int mt312_attach(struct dvb_i2c_bus *i2c) if ((ret = mt312_readreg(i2c, ID, &id)) < 0) return ret; - if (id != 0x03) + if ((id != ID_VP310) && (id != ID_MT312)) return -ENODEV; - return dvb_register_frontend(mt312_ioctl, i2c, NULL, &mt312_info); + return dvb_register_frontend(mt312_ioctl, i2c, (void *)(long)id, &mt312_info); } static |