Updated from Linux LTS 3.10.24 to 3.10.25
This commit is contained in:
@@ -170,18 +170,18 @@ static int af9033_rd_reg_mask(struct af9033_state *state, u32 reg, u8 *val,
|
||||
static int af9033_wr_reg_val_tab(struct af9033_state *state,
|
||||
const struct reg_val *tab, int tab_len)
|
||||
{
|
||||
#define MAX_TAB_LEN 212
|
||||
int ret, i, j;
|
||||
u8 buf[MAX_XFER_SIZE];
|
||||
|
||||
if (tab_len > sizeof(buf)) {
|
||||
dev_warn(&state->i2c->dev,
|
||||
"%s: i2c wr len=%d is too big!\n",
|
||||
KBUILD_MODNAME, tab_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
u8 buf[1 + MAX_TAB_LEN];
|
||||
|
||||
dev_dbg(&state->i2c->dev, "%s: tab_len=%d\n", __func__, tab_len);
|
||||
|
||||
if (tab_len > sizeof(buf)) {
|
||||
dev_warn(&state->i2c->dev, "%s: tab len %d is too big\n",
|
||||
KBUILD_MODNAME, tab_len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (i = 0, j = 0; i < tab_len; i++) {
|
||||
buf[j] = tab[i].val;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ static int cxd2820r_wr_regs_i2c(struct cxd2820r_priv *priv, u8 i2c, u8 reg,
|
||||
{
|
||||
.addr = i2c,
|
||||
.flags = 0,
|
||||
.len = sizeof(buf),
|
||||
.len = len + 1,
|
||||
.buf = buf,
|
||||
}
|
||||
};
|
||||
@@ -75,7 +75,7 @@ static int cxd2820r_rd_regs_i2c(struct cxd2820r_priv *priv, u8 i2c, u8 reg,
|
||||
}, {
|
||||
.addr = i2c,
|
||||
.flags = I2C_M_RD,
|
||||
.len = sizeof(buf),
|
||||
.len = len,
|
||||
.buf = buf,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -131,12 +131,10 @@ static int wm8775_s_routing(struct v4l2_subdev *sd,
|
||||
return -EINVAL;
|
||||
}
|
||||
state->input = input;
|
||||
if (!v4l2_ctrl_g_ctrl(state->mute))
|
||||
if (v4l2_ctrl_g_ctrl(state->mute))
|
||||
return 0;
|
||||
if (!v4l2_ctrl_g_ctrl(state->vol))
|
||||
return 0;
|
||||
if (!v4l2_ctrl_g_ctrl(state->bal))
|
||||
return 0;
|
||||
wm8775_set_audio(sd, 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -4226,7 +4226,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
|
||||
}
|
||||
btv->std = V4L2_STD_PAL;
|
||||
init_irqreg(btv);
|
||||
v4l2_ctrl_handler_setup(hdl);
|
||||
if (!bttv_tvcards[btv->c.type].no_video)
|
||||
v4l2_ctrl_handler_setup(hdl);
|
||||
if (hdl->error) {
|
||||
result = hdl->error;
|
||||
goto fail2;
|
||||
|
||||
@@ -1348,9 +1348,11 @@ static int saa7164_initdev(struct pci_dev *pci_dev,
|
||||
if (fw_debug) {
|
||||
dev->kthread = kthread_run(saa7164_thread_function, dev,
|
||||
"saa7164 debug");
|
||||
if (!dev->kthread)
|
||||
if (IS_ERR(dev->kthread)) {
|
||||
dev->kthread = NULL;
|
||||
printk(KERN_ERR "%s() Failed to create "
|
||||
"debug kernel thread\n", __func__);
|
||||
}
|
||||
}
|
||||
|
||||
} /* != BOARD_UNKNOWN */
|
||||
|
||||
@@ -130,7 +130,7 @@ static int af9035_wr_regs(struct dvb_usb_device *d, u32 reg, u8 *val, int len)
|
||||
{
|
||||
u8 wbuf[MAX_XFER_SIZE];
|
||||
u8 mbox = (reg >> 16) & 0xff;
|
||||
struct usb_req req = { CMD_MEM_WR, mbox, sizeof(wbuf), wbuf, 0, NULL };
|
||||
struct usb_req req = { CMD_MEM_WR, mbox, 6 + len, wbuf, 0, NULL };
|
||||
|
||||
if (6 + len > sizeof(wbuf)) {
|
||||
dev_warn(&d->udev->dev, "%s: i2c wr: len=%d is too big!\n",
|
||||
@@ -237,14 +237,15 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
|
||||
} else {
|
||||
/* I2C */
|
||||
u8 buf[MAX_XFER_SIZE];
|
||||
struct usb_req req = { CMD_I2C_RD, 0, sizeof(buf),
|
||||
struct usb_req req = { CMD_I2C_RD, 0, 5 + msg[0].len,
|
||||
buf, msg[1].len, msg[1].buf };
|
||||
|
||||
if (5 + msg[0].len > sizeof(buf)) {
|
||||
dev_warn(&d->udev->dev,
|
||||
"%s: i2c xfer: len=%d is too big!\n",
|
||||
KBUILD_MODNAME, msg[0].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
req.mbox |= ((msg[0].addr & 0x80) >> 3);
|
||||
buf[0] = msg[1].len;
|
||||
@@ -273,14 +274,15 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
|
||||
} else {
|
||||
/* I2C */
|
||||
u8 buf[MAX_XFER_SIZE];
|
||||
struct usb_req req = { CMD_I2C_WR, 0, sizeof(buf), buf,
|
||||
0, NULL };
|
||||
struct usb_req req = { CMD_I2C_WR, 0, 5 + msg[0].len,
|
||||
buf, 0, NULL };
|
||||
|
||||
if (5 + msg[0].len > sizeof(buf)) {
|
||||
dev_warn(&d->udev->dev,
|
||||
"%s: i2c xfer: len=%d is too big!\n",
|
||||
KBUILD_MODNAME, msg[0].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
req.mbox |= ((msg[0].addr & 0x80) >> 3);
|
||||
buf[0] = msg[0].len;
|
||||
@@ -300,6 +302,7 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
|
||||
ret = -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
|
||||
if (ret < 0)
|
||||
@@ -1512,6 +1515,8 @@ static const struct usb_device_id af9035_id_table[] = {
|
||||
/* XXX: that same ID [0ccd:0099] is used by af9015 driver too */
|
||||
{ DVB_USB_DEVICE(USB_VID_TERRATEC, 0x0099,
|
||||
&af9035_props, "TerraTec Cinergy T Stick Dual RC (rev. 2)", NULL) },
|
||||
{ DVB_USB_DEVICE(USB_VID_LEADTEK, 0x6a05,
|
||||
&af9035_props, "Leadtek WinFast DTV Dongle Dual", NULL) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, af9035_id_table);
|
||||
|
||||
Reference in New Issue
Block a user