diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-07 15:16:36 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-07 15:16:36 -0500 |
| commit | 3e382dd9d01d34b8770c0959abe52f4210ae237b (patch) | |
| tree | 1e3951b34ebcd85fc35c43aceb10597bf4c7f591 | |
| parent | 2091f4358fb20a7403ff35772f52026c8d7730c6 (diff) | |
| parent | 57f0547fbc1e925f5e58c76f311a6632c3f37740 (diff) | |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
"A series of small fixes. Mostly driver ones. There is one core
regression fix on a patch that was meant to fix some race issues on
vb2, but that actually caused more harm than good. So, we're just
reverting it for now"
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
[media] adv7842: Composite free-run platfrom-data fix
[media] v4l2-dv-timings: fix GTF calculation
[media] hdpvr: Fix memory leak in debug
[media] af9035: add ID [2040:f900] Hauppauge WinTV-MiniStick 2
[media] mxl111sf: Fix compile when CONFIG_DVB_USB_MXL111SF is unset
[media] mxl111sf: Fix unintentional garbage stack read
[media] cx24117: use a valid dev pointer for dev_err printout
[media] cx24117: remove dead code in always 'false' if statement
[media] update Michael Krufky's email address
[media] vb2: Check if there are buffers before streamon
[media] Revert "[media] videobuf_vm_{open,close} race fixes"
[media] go7007-loader: fix usb_dev leak
[media] media: bt8xx: add missing put_device call
[media] exynos4-is: Compile in fimc-lite runtime PM callbacks conditionally
[media] exynos4-is: Compile in fimc runtime PM callbacks conditionally
[media] exynos4-is: Fix error paths in probe() for !pm_runtime_enabled()
[media] s5p-jpeg: Fix wrong NV12 format parameters
[media] s5k5baf: allow to handle arbitrary long i2c sequences
32 files changed, 84 insertions, 72 deletions
diff --git a/Documentation/dvb/contributors.txt b/Documentation/dvb/contributors.txt index 47c30098dab6..731a009723c7 100644 --- a/Documentation/dvb/contributors.txt +++ b/Documentation/dvb/contributors.txt | |||
| @@ -78,7 +78,7 @@ Peter Beutner <p.beutner@gmx.net> | |||
| 78 | Wilson Michaels <wilsonmichaels@earthlink.net> | 78 | Wilson Michaels <wilsonmichaels@earthlink.net> |
| 79 | for the lgdt330x frontend driver, and various bugfixes | 79 | for the lgdt330x frontend driver, and various bugfixes |
| 80 | 80 | ||
| 81 | Michael Krufky <mkrufky@m1k.net> | 81 | Michael Krufky <mkrufky@linuxtv.org> |
| 82 | for maintaining v4l/dvb inter-tree dependencies | 82 | for maintaining v4l/dvb inter-tree dependencies |
| 83 | 83 | ||
| 84 | Taylor Jacob <rtjacob@earthlink.net> | 84 | Taylor Jacob <rtjacob@earthlink.net> |
diff --git a/drivers/media/dvb-frontends/cx24117.c b/drivers/media/dvb-frontends/cx24117.c index 68f768a5422d..a6c3c9e2e897 100644 --- a/drivers/media/dvb-frontends/cx24117.c +++ b/drivers/media/dvb-frontends/cx24117.c | |||
| @@ -1176,7 +1176,7 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config, | |||
| 1176 | 1176 | ||
| 1177 | switch (demod) { | 1177 | switch (demod) { |
| 1178 | case 0: | 1178 | case 0: |
| 1179 | dev_err(&state->priv->i2c->dev, | 1179 | dev_err(&i2c->dev, |
| 1180 | "%s: Error attaching frontend %d\n", | 1180 | "%s: Error attaching frontend %d\n", |
| 1181 | KBUILD_MODNAME, demod); | 1181 | KBUILD_MODNAME, demod); |
| 1182 | goto error1; | 1182 | goto error1; |
| @@ -1200,12 +1200,6 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config, | |||
| 1200 | state->demod = demod - 1; | 1200 | state->demod = demod - 1; |
| 1201 | state->priv = priv; | 1201 | state->priv = priv; |
| 1202 | 1202 | ||
| 1203 | /* test i2c bus for ack */ | ||
| 1204 | if (demod == 0) { | ||
| 1205 | if (cx24117_readreg(state, 0x00) < 0) | ||
| 1206 | goto error3; | ||
| 1207 | } | ||
| 1208 | |||
| 1209 | dev_info(&state->priv->i2c->dev, | 1203 | dev_info(&state->priv->i2c->dev, |
| 1210 | "%s: Attaching frontend %d\n", | 1204 | "%s: Attaching frontend %d\n", |
| 1211 | KBUILD_MODNAME, state->demod); | 1205 | KBUILD_MODNAME, state->demod); |
| @@ -1216,8 +1210,6 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config, | |||
| 1216 | state->frontend.demodulator_priv = state; | 1210 | state->frontend.demodulator_priv = state; |
| 1217 | return &state->frontend; | 1211 | return &state->frontend; |
| 1218 | 1212 | ||
| 1219 | error3: | ||
| 1220 | kfree(state); | ||
| 1221 | error2: | 1213 | error2: |
| 1222 | cx24117_release_priv(priv); | 1214 | cx24117_release_priv(priv); |
| 1223 | error1: | 1215 | error1: |
diff --git a/drivers/media/dvb-frontends/nxt200x.c b/drivers/media/dvb-frontends/nxt200x.c index 4bf057544607..8a8e1ecb762d 100644 --- a/drivers/media/dvb-frontends/nxt200x.c +++ b/drivers/media/dvb-frontends/nxt200x.c | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | * Support for NXT2002 and NXT2004 - VSB/QAM | 2 | * Support for NXT2002 and NXT2004 - VSB/QAM |
| 3 | * | 3 | * |
| 4 | * Copyright (C) 2005 Kirk Lapray <kirk.lapray@gmail.com> | 4 | * Copyright (C) 2005 Kirk Lapray <kirk.lapray@gmail.com> |
| 5 | * Copyright (C) 2006 Michael Krufky <mkrufky@m1k.net> | 5 | * Copyright (C) 2006-2014 Michael Krufky <mkrufky@linuxtv.org> |
| 6 | * based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net> | 6 | * based on nxt2002 by Taylor Jacob <rtjacob@earthlink.net> |
| 7 | * and nxt2004 by Jean-Francois Thibert <jeanfrancois@sagetv.com> | 7 | * and nxt2004 by Jean-Francois Thibert <jeanfrancois@sagetv.com> |
| 8 | * | 8 | * |
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 1effc21e1cdd..9bbd6656fb8f 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c | |||
| @@ -2554,7 +2554,7 @@ static int adv7842_core_init(struct v4l2_subdev *sd) | |||
| 2554 | sdp_write_and_or(sd, 0xdd, 0xf0, pdata->sdp_free_run_force | | 2554 | sdp_write_and_or(sd, 0xdd, 0xf0, pdata->sdp_free_run_force | |
| 2555 | (pdata->sdp_free_run_cbar_en << 1) | | 2555 | (pdata->sdp_free_run_cbar_en << 1) | |
| 2556 | (pdata->sdp_free_run_man_col_en << 2) | | 2556 | (pdata->sdp_free_run_man_col_en << 2) | |
| 2557 | (pdata->sdp_free_run_force << 3)); | 2557 | (pdata->sdp_free_run_auto << 3)); |
| 2558 | 2558 | ||
| 2559 | /* TODO from platform data */ | 2559 | /* TODO from platform data */ |
| 2560 | cp_write(sd, 0x69, 0x14); /* Enable CP CSC */ | 2560 | cp_write(sd, 0x69, 0x14); /* Enable CP CSC */ |
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c index 4b8381111cbd..77e10e0fd8d6 100644 --- a/drivers/media/i2c/s5k5baf.c +++ b/drivers/media/i2c/s5k5baf.c | |||
| @@ -478,25 +478,33 @@ static void s5k5baf_write_arr_seq(struct s5k5baf *state, u16 addr, | |||
| 478 | u16 count, const u16 *seq) | 478 | u16 count, const u16 *seq) |
| 479 | { | 479 | { |
| 480 | struct i2c_client *c = v4l2_get_subdevdata(&state->sd); | 480 | struct i2c_client *c = v4l2_get_subdevdata(&state->sd); |
| 481 | __be16 buf[count + 1]; | 481 | __be16 buf[65]; |
| 482 | int ret, n; | ||
| 483 | 482 | ||
| 484 | s5k5baf_i2c_write(state, REG_CMDWR_ADDR, addr); | 483 | s5k5baf_i2c_write(state, REG_CMDWR_ADDR, addr); |
| 485 | if (state->error) | 484 | if (state->error) |
| 486 | return; | 485 | return; |
| 487 | 486 | ||
| 487 | v4l2_dbg(3, debug, c, "i2c_write_seq(count=%d): %*ph\n", count, | ||
| 488 | min(2 * count, 64), seq); | ||
| 489 | |||
| 488 | buf[0] = __constant_cpu_to_be16(REG_CMD_BUF); | 490 | buf[0] = __constant_cpu_to_be16(REG_CMD_BUF); |
| 489 | for (n = 1; n <= count; ++n) | ||
| 490 | buf[n] = cpu_to_be16(*seq++); | ||
| 491 | 491 | ||
| 492 | n *= 2; | 492 | while (count > 0) { |
| 493 | ret = i2c_master_send(c, (char *)buf, n); | 493 | int n = min_t(int, count, ARRAY_SIZE(buf) - 1); |
| 494 | v4l2_dbg(3, debug, c, "i2c_write_seq(count=%d): %*ph\n", count, | 494 | int ret, i; |
| 495 | min(2 * count, 64), seq - count); | ||
| 496 | 495 | ||
| 497 | if (ret != n) { | 496 | for (i = 1; i <= n; ++i) |
| 498 | v4l2_err(c, "i2c_write_seq: error during transfer (%d)\n", ret); | 497 | buf[i] = cpu_to_be16(*seq++); |
| 499 | state->error = ret; | 498 | |
| 499 | i *= 2; | ||
| 500 | ret = i2c_master_send(c, (char *)buf, i); | ||
| 501 | if (ret != i) { | ||
| 502 | v4l2_err(c, "i2c_write_seq: error during transfer (%d)\n", ret); | ||
| 503 | state->error = ret; | ||
| 504 | break; | ||
| 505 | } | ||
| 506 | |||
| 507 | count -= n; | ||
| 500 | } | 508 | } |
| 501 | } | ||
