aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-03-24 16:34:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-03-24 16:34:16 -0400
commite88711860dee6ce0dba459abf6be446ccfc64443 (patch)
tree121242d1145f9011c958f357d000b503dd54a3d2
parent86b7eab29dbe27acd5b67a7f110e244a0c3f4b96 (diff)
parent24a47426066c8ba16a4db1b20a41d63187281195 (diff)
Merge tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: - dvb-usb-firmware: don't do DMA on stack - coda/imx-vdoa: platform_driver should not be const - bdisp: Clean up file handle in open() error path - exynos-gsc: Do not swap cb/cr for semi planar formats * tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] exynos-gsc: Do not swap cb/cr for semi planar formats [media] bdisp: Clean up file handle in open() error path [media] coda/imx-vdoa: platform_driver should not be const [media] dvb-usb-firmware: don't do DMA on stack
-rw-r--r--drivers/media/platform/coda/imx-vdoa.c2
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-core.c2
-rw-r--r--drivers/media/platform/sti/bdisp/bdisp-v4l2.c2
-rw-r--r--drivers/media/usb/dvb-usb/dvb-usb-firmware.c22
4 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/platform/coda/imx-vdoa.c b/drivers/media/platform/coda/imx-vdoa.c
index 67fd8ffa60a4..669a4c82f1ff 100644
--- a/drivers/media/platform/coda/imx-vdoa.c
+++ b/drivers/media/platform/coda/imx-vdoa.c
@@ -321,7 +321,7 @@ static const struct of_device_id vdoa_dt_ids[] = {
321}; 321};
322MODULE_DEVICE_TABLE(of, vdoa_dt_ids); 322MODULE_DEVICE_TABLE(of, vdoa_dt_ids);
323 323
324static const struct platform_driver vdoa_driver = { 324static struct platform_driver vdoa_driver = {
325 .probe = vdoa_probe, 325 .probe = vdoa_probe,
326 .remove = vdoa_remove, 326 .remove = vdoa_remove,
327 .driver = { 327 .driver = {
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c
index cbb03768f5d7..0f0c389f8897 100644
--- a/drivers/media/platform/exynos-gsc/gsc-core.c
+++ b/drivers/media/platform/exynos-gsc/gsc-core.c
@@ -861,9 +861,7 @@ int gsc_prepare_addr(struct gsc_ctx *ctx, struct vb2_buffer *vb,
861 861
862 if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) || 862 if ((frame->fmt->pixelformat == V4L2_PIX_FMT_VYUY) ||
863 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) || 863 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVYU) ||
864 (frame->fmt->pixelformat == V4L2_PIX_FMT_NV61) ||
865 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) || 864 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) ||
866 (frame->fmt->pixelformat == V4L2_PIX_FMT_NV21) ||
867 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M)) 865 (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420M))
868 swap(addr->cb, addr->cr); 866 swap(addr->cb, addr->cr);
869 867
diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 823608112d89..7918b928f058 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -632,8 +632,8 @@ static int bdisp_open(struct file *file)
632 632
633error_ctrls: 633error_ctrls:
634 bdisp_ctrls_delete(ctx); 634 bdisp_ctrls_delete(ctx);
635error_fh:
636 v4l2_fh_del(&ctx->fh); 635 v4l2_fh_del(&ctx->fh);
636error_fh:
637 v4l2_fh_exit(&ctx->fh); 637 v4l2_fh_exit(&ctx->fh);
638 bdisp_hw_free_nodes(ctx); 638 bdisp_hw_free_nodes(ctx);
639mem_ctx: 639mem_ctx:
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
index ab9866024ec7..04033efe7ad5 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-firmware.c
@@ -36,16 +36,18 @@ static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 le
36int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) 36int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type)
37{ 37{
38 struct hexline *hx; 38 struct hexline *hx;
39 u8 reset; 39 u8 *buf;
40 int ret,pos=0; 40 int ret, pos = 0;
41 u16 cpu_cs_register = cypress[type].cpu_cs_register;
41 42
42 hx = kmalloc(sizeof(*hx), GFP_KERNEL); 43 buf = kmalloc(sizeof(*hx), GFP_KERNEL);
43 if (!hx) 44 if (!buf)
44 return -ENOMEM; 45 return -ENOMEM;
46 hx = (struct hexline *)buf;
45 47
46 /* stop the CPU */ 48 /* stop the CPU */
47 reset = 1; 49 buf[0] = 1;
48 if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1)) != 1) 50 if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1)
49 err("could not stop the USB controller CPU."); 51 err("could not stop the USB controller CPU.");
50 52
51 while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) { 53 while ((ret = dvb_usb_get_hexline(fw, hx, &pos)) > 0) {
@@ -61,21 +63,21 @@ int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw
61 } 63 }
62 if (ret < 0) { 64 if (ret < 0) {
63 err("firmware download failed at %d with %d",pos,ret); 65 err("firmware download failed at %d with %d",pos,ret);
64 kfree(hx); 66 kfree(buf);
65 return ret; 67 return ret;
66 } 68 }
67 69
68 if (ret == 0) { 70 if (ret == 0) {
69 /* restart the CPU */ 71 /* restart the CPU */
70 reset = 0; 72 buf[0] = 0;
71 if (ret || usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1) != 1) { 73 if (usb_cypress_writemem(udev, cpu_cs_register, buf, 1) != 1) {
72 err("could not restart the USB controller CPU."); 74 err("could not restart the USB controller CPU.");
73 ret = -EINVAL; 75 ret = -EINVAL;
74 } 76 }
75 } else 77 } else
76 ret = -EIO; 78 ret = -EIO;
77 79
78 kfree(hx); 80 kfree(buf);
79 81
80 return ret; 82 return ret;
81} 83}