diff options
-rw-r--r-- | drivers/media/i2c/ov7670.c | 2 | ||||
-rw-r--r-- | drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 | ||||
-rw-r--r-- | drivers/media/media-device.c | 1 | ||||
-rw-r--r-- | drivers/media/platform/davinci/vpbe_display.c | 16 | ||||
-rw-r--r-- | drivers/media/platform/davinci/vpfe_capture.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/davinci/vpif_capture.c | 34 | ||||
-rw-r--r-- | drivers/media/platform/davinci/vpif_display.c | 35 | ||||
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-core.c | 2 | ||||
-rw-r--r-- | drivers/media/tuners/fc2580.c | 6 | ||||
-rw-r--r-- | drivers/media/tuners/fc2580_priv.h | 1 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 48 | ||||
-rw-r--r-- | drivers/media/usb/gspca/sonixb.c | 2 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 12 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/vpfe_video.c | 13 | ||||
-rw-r--r-- | drivers/staging/media/sn9c102/sn9c102_devtable.h | 2 |
16 files changed, 132 insertions, 47 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index e8a1ce204036..cdd7c1b7259b 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c | |||
@@ -1109,7 +1109,7 @@ static int ov7670_enum_framesizes(struct v4l2_subdev *sd, | |||
1109 | * windows that fall outside that. | 1109 | * windows that fall outside that. |
1110 | */ | 1110 | */ |
1111 | for (i = 0; i < n_win_sizes; i++) { | 1111 | for (i = 0; i < n_win_sizes; i++) { |
1112 | struct ov7670_win_size *win = &info->devtype->win_sizes[index]; | 1112 | struct ov7670_win_size *win = &info->devtype->win_sizes[i]; |
1113 | if (info->min_width && win->width < info->min_width) | 1113 | if (info->min_width && win->width < info->min_width) |
1114 | continue; | 1114 | continue; |
1115 | if (info->min_height && win->height < info->min_height) | 1115 | if (info->min_height && win->height < info->min_height) |
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index a4459301b5f8..ee0f57e01b56 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c | |||
@@ -1616,7 +1616,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state) | |||
1616 | if (ret < 0) | 1616 | if (ret < 0) |
1617 | return -EINVAL; | 1617 | return -EINVAL; |
1618 | 1618 | ||
1619 | node_ep = v4l2_of_get_next_endpoint(node, NULL); | 1619 | node_ep = of_graph_get_next_endpoint(node, NULL); |
1620 | if (!node_ep) { | 1620 | if (!node_ep) { |
1621 | dev_warn(dev, "no endpoint defined for node: %s\n", | 1621 | dev_warn(dev, "no endpoint defined for node: %s\n", |
1622 | node->full_name); | 1622 | node->full_name); |
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index d5a7a135f75d..703560fa5e73 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c | |||
@@ -93,6 +93,7 @@ static long media_device_enum_entities(struct media_device *mdev, | |||
93 | struct media_entity *ent; | 93 | struct media_entity *ent; |
94 | struct media_entity_desc u_ent; | 94 | struct media_entity_desc u_ent; |
95 | 95 | ||
96 | memset(&u_ent, 0, sizeof(u_ent)); | ||
96 | if (copy_from_user(&u_ent.id, &uent->id, sizeof(u_ent.id))) | 97 | if (copy_from_user(&u_ent.id, &uent->id, sizeof(u_ent.id))) |
97 | return -EFAULT; | 98 | return -EFAULT; |
98 | 99 | ||
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index b4f12d00be05..656708252962 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c | |||
@@ -372,18 +372,32 @@ static int vpbe_stop_streaming(struct vb2_queue *vq) | |||
372 | { | 372 | { |
373 | struct vpbe_fh *fh = vb2_get_drv_priv(vq); | 373 | struct vpbe_fh *fh = vb2_get_drv_priv(vq); |
374 | struct vpbe_layer *layer = fh->layer; | 374 | struct vpbe_layer *layer = fh->layer; |
375 | struct vpbe_display *disp = fh->disp_dev; | ||
376 | unsigned long flags; | ||
375 | 377 | ||
376 | if (!vb2_is_streaming(vq)) | 378 | if (!vb2_is_streaming(vq)) |
377 | return 0; | 379 | return 0; |
378 | 380 | ||
379 | /* release all active buffers */ | 381 | /* release all active buffers */ |
382 | spin_lock_irqsave(&disp->dma_queue_lock, flags); | ||
383 | if (layer->cur_frm == layer->next_frm) { | ||
384 | vb2_buffer_done(&layer->cur_frm->vb, VB2_BUF_STATE_ERROR); | ||
385 | } else { | ||
386 | if (layer->cur_frm != NULL) | ||
387 | vb2_buffer_done(&layer->cur_frm->vb, | ||
388 | VB2_BUF_STATE_ERROR); | ||
389 | if (layer->next_frm != NULL) | ||
390 | vb2_buffer_done(&layer->next_frm->vb, | ||
391 | VB2_BUF_STATE_ERROR); | ||
392 | } | ||
393 | |||
380 | while (!list_empty(&layer->dma_queue)) { | 394 | while (!list_empty(&layer->dma_queue)) { |
381 | layer->next_frm = list_entry(layer->dma_queue.next, | 395 | layer->next_frm = list_entry(layer->dma_queue.next, |
382 | struct vpbe_disp_buffer, list); | 396 | struct vpbe_disp_buffer, list); |
383 | list_del(&layer->next_frm->list); | 397 | list_del(&layer->next_frm->list); |
384 | vb2_buffer_done(&layer->next_frm->vb, VB2_BUF_STATE_ERROR); | 398 | vb2_buffer_done(&layer->next_frm->vb, VB2_BUF_STATE_ERROR); |
385 | } | 399 | } |
386 | 400 | spin_unlock_irqrestore(&disp->dma_queue_lock, flags); | |
387 | return 0; | 401 | return 0; |
388 | } | 402 | } |
389 | 403 | ||
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index d762246eabf5..0379cb9f9a9c 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c | |||
@@ -734,6 +734,8 @@ static int vpfe_release(struct file *file) | |||
734 | } | 734 | } |
735 | vpfe_dev->io_usrs = 0; | 735 | vpfe_dev->io_usrs = 0; |
736 | vpfe_dev->numbuffers = config_params.numbuffers; | 736 | vpfe_dev->numbuffers = config_params.numbuffers; |
737 | videobuf_stop(&vpfe_dev->buffer_queue); | ||
738 | videobuf_mmap_free(&vpfe_dev->buffer_queue); | ||
737 | } | 739 | } |
738 | 740 | ||
739 | /* Decrement device usrs counter */ | 741 | /* Decrement device usrs counter */ |
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 756da78bac23..8dea0b84a3ad 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c | |||
@@ -358,8 +358,31 @@ static int vpif_stop_streaming(struct vb2_queue *vq) | |||
358 | 358 | ||
359 | common = &ch->common[VPIF_VIDEO_INDEX]; | 359 | common = &ch->common[VPIF_VIDEO_INDEX]; |
360 | 360 | ||
361 | /* Disable channel as per its device type and channel id */ | ||
362 | if (VPIF_CHANNEL0_VIDEO == ch->channel_id) { | ||
363 | enable_channel0(0); | ||
364 | channel0_intr_enable(0); | ||
365 | } | ||
366 | if ((VPIF_CHANNEL1_VIDEO == ch->channel_id) || | ||
367 | (2 == common->started)) { | ||
368 | enable_channel1(0); | ||
369 | channel1_intr_enable(0); | ||
370 | } | ||
371 | common->started = 0; | ||
372 | |||
361 | /* release all active buffers */ | 373 | /* release all active buffers */ |
362 | spin_lock_irqsave(&common->irqlock, flags); | 374 | spin_lock_irqsave(&common->irqlock, flags); |
375 | if (common->cur_frm == common->next_frm) { | ||
376 | vb2_buffer_done(&common->cur_frm->vb, VB2_BUF_STATE_ERROR); | ||
377 | } else { | ||
378 | if (common->cur_frm != NULL) | ||
379 | vb2_buffer_done(&common->cur_frm->vb, | ||
380 | VB2_BUF_STATE_ERROR); | ||
381 | if (common->next_frm != NULL) | ||
382 | vb2_buffer_done(&common->next_frm->vb, | ||
383 | VB2_BUF_STATE_ERROR); | ||
384 | } | ||
385 | |||
363 | while (!list_empty(&common->dma_queue)) { | 386 | while (!list_empty(&common->dma_queue)) { |
364 | common->next_frm = list_entry(common->dma_queue.next, | 387 | common->next_frm = list_entry(common->dma_queue.next, |
365 | struct vpif_cap_buffer, list); | 388 | struct vpif_cap_buffer, list); |
@@ -933,17 +956,6 @@ static int vpif_release(struct file *filep) | |||
933 | if (fh->io_allowed[VPIF_VIDEO_INDEX]) { | 956 | if (fh->io_allowed[VPIF_VIDEO_INDEX]) { |
934 | /* Reset io_usrs member of channel object */ | 957 | /* Reset io_usrs member of channel object */ |
935 | common->io_usrs = 0; | 958 | common->io_usrs = 0; |
936 | /* Disable channel as per its device type and channel id */ | ||
937 | if (VPIF_CHANNEL0_VIDEO == ch->channel_id) { | ||
938 | enable_channel0(0); | ||
939 | channel0_intr_enable(0); | ||
940 | } | ||
941 | if ((VPIF_CHANNEL1_VIDEO == ch->channel_id) || | ||
942 | (2 == common->started)) { | ||
943 | enable_channel1(0); | ||
944 | channel1_intr_enable(0); | ||
945 | } | ||
946 | common->started = 0; | ||
947 | /* Free buffers allocated */ | 959 | /* Free buffers allocated */ |
948 | vb2_queue_release(&common->buffer_queue); | 960 | vb2_queue_release(&common->buffer_queue); |
949 | vb2_dma_contig_cleanup_ctx(common->alloc_ctx); | 961 | vb2_dma_contig_cleanup_ctx(common->alloc_ctx); |
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 0ac841e35aa4..aed41edd0501 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c | |||
@@ -320,8 +320,31 @@ static int vpif_stop_streaming(struct vb2_queue *vq) | |||
320 | 320 | ||
321 | common = &ch->common[VPIF_VIDEO_INDEX]; | 321 | common = &ch->common[VPIF_VIDEO_INDEX]; |
322 | 322 | ||
323 | /* Disable channel */ | ||
324 | if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { | ||
325 | enable_channel2(0); | ||
326 | channel2_intr_enable(0); | ||
327 | } | ||
328 | if ((VPIF_CHANNEL3_VIDEO == ch->channel_id) || | ||
329 | (2 == common->started)) { | ||
330 | enable_channel3(0); | ||
331 | channel3_intr_enable(0); | ||
332 | } | ||
333 | common->started = 0; | ||
334 | |||
323 | /* release all active buffers */ | 335 | /* release all active buffers */ |
324 | spin_lock_irqsave(&common->irqlock, flags); | 336 | spin_lock_irqsave(&common->irqlock, flags); |
337 | if (common->cur_frm == common->next_frm) { | ||
338 | vb2_buffer_done(&common->cur_frm->vb, VB2_BUF_STATE_ERROR); | ||
339 | } else { | ||
340 | if (common->cur_frm != NULL) | ||
341 | vb2_buffer_done(&common->cur_frm->vb, | ||
342 | VB2_BUF_STATE_ERROR); | ||
343 | if (common->next_frm != NULL) | ||
344 | vb2_buffer_done(&common->next_frm->vb, | ||
345 | VB2_BUF_STATE_ERROR); | ||
346 | } | ||
347 | |||
325 | while (!list_empty(&common->dma_queue)) { | 348 | while (!list_empty(&common->dma_queue)) { |
326 | common->next_frm = list_entry(common->dma_queue.next, | 349 | common->next_frm = list_entry(common->dma_queue.next, |
327 | struct vpif_disp_buffer, list); | 350 | struct vpif_disp_buffer, list); |
@@ -773,18 +796,6 @@ static int vpif_release(struct file *filep) | |||
773 | if (fh->io_allowed[VPIF_VIDEO_INDEX]) { | 796 | if (fh->io_allowed[VPIF_VIDEO_INDEX]) { |
774 | /* Reset io_usrs member of channel object */ | 797 | /* Reset io_usrs member of channel object */ |
775 | common->io_usrs = 0; | 798 | common->io_usrs = 0; |
776 | /* Disable channel */ | ||
777 | if (VPIF_CHANNEL2_VIDEO == ch->channel_id) { | ||
778 | enable_channel2(0); | ||
779 | channel2_intr_enable(0); | ||
780 | } | ||
781 | if ((VPIF_CHANNEL3_VIDEO == ch->channel_id) || | ||
782 | (2 == common->started)) { | ||
783 | enable_channel3(0); | ||
784 | channel3_intr_enable(0); | ||
785 | } | ||
786 | common->started = 0; | ||
787 | |||
788 | /* Free buffers allocated */ | 799 | /* Free buffers allocated */ |
789 | vb2_queue_release(&common->buffer_queue); | 800 | vb2_queue_release(&common->buffer_queue); |
790 | vb2_dma_contig_cleanup_ctx(common->alloc_ctx); | 801 | vb2_dma_contig_cleanup_ctx(common->alloc_ctx); |
diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c index da2fc86cc524..25dbf5b05a96 100644 --- a/drivers/media/platform/exynos4-is/fimc-core.c +++ b/drivers/media/platform/exynos4-is/fimc-core.c | |||
@@ -122,7 +122,7 @@ static struct fimc_fmt fimc_formats[] = { | |||
122 | }, { | 122 | }, { |
123 | .name = "YUV 4:2:2 planar, Y/Cb/Cr", | 123 | .name = "YUV 4:2:2 planar, Y/Cb/Cr", |
124 | .fourcc = V4L2_PIX_FMT_YUV422P, | 124 | .fourcc = V4L2_PIX_FMT_YUV422P, |
125 | .depth = { 12 }, | 125 | .depth = { 16 }, |
126 | .color = FIMC_FMT_YCBYCR422, | 126 | .color = FIMC_FMT_YCBYCR422, |
127 | .memplanes = 1, | 127 | .memplanes = 1, |
128 | .colplanes = 3, | 128 | .colplanes = 3, |
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c index 3aecaf465094..f0c9c42867de 100644 --- a/drivers/media/tuners/fc2580.c +++ b/drivers/media/tuners/fc2580.c | |||
@@ -195,7 +195,7 @@ static int fc2580_set_params(struct dvb_frontend *fe) | |||
195 | 195 | ||
196 | f_ref = 2UL * priv->cfg->clock / r_val; | 196 | f_ref = 2UL * priv->cfg->clock / r_val; |
197 | n_val = div_u64_rem(f_vco, f_ref, &k_val); | 197 | n_val = div_u64_rem(f_vco, f_ref, &k_val); |
198 | k_val_reg = 1UL * k_val * (1 << 20) / f_ref; | 198 | k_val_reg = div_u64(1ULL * k_val * (1 << 20), f_ref); |
199 | 199 | ||
200 | ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff)); | 200 | ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff)); |
201 | if (ret < 0) | 201 | if (ret < 0) |
@@ -348,8 +348,8 @@ static int fc2580_set_params(struct dvb_frontend *fe) | |||
348 | if (ret < 0) | 348 | if (ret < 0) |
349 | goto err; | 349 | goto err; |
350 | 350 | ||
351 | ret = fc2580_wr_reg(priv, 0x37, 1UL * priv->cfg->clock * \ | 351 | ret = fc2580_wr_reg(priv, 0x37, div_u64(1ULL * priv->cfg->clock * |
352 | fc2580_if_filter_lut[i].mul / 1000000000); | 352 | fc2580_if_filter_lut[i].mul, 1000000000)); |
353 | if (ret < 0) | 353 | if (ret < 0) |
354 | goto err; | 354 | goto err; |
355 | 355 | ||
diff --git a/drivers/media/tuners/fc2580_priv.h b/drivers/media/tuners/fc2580_priv.h index be38a9e637e0..646c99452136 100644 --- a/drivers/media/tuners/fc2580_priv.h +++ b/drivers/media/tuners/fc2580_priv.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define FC2580_PRIV_H | 22 | #define FC2580_PRIV_H |
23 | 23 | ||
24 | #include "fc2580.h" | 24 | #include "fc2580.h" |
25 | #include <linux/math64.h> | ||
25 | 26 | ||
26 | struct fc2580_reg_val { | 27 | struct fc2580_reg_val { |
27 | u8 reg; | 28 | u8 reg; |
diff --git a/drivers/media/usb/dvb-usb-v2/Makefile b/drivers/media/usb/dvb-usb-v2/Makefile index 7407b8338ccf..bc38f03394cd 100644 --- a/drivers/media/usb/dvb-usb-v2/Makefile +++ b/drivers/media/usb/dvb-usb-v2/Makefile | |||
@@ -41,4 +41,3 @@ ccflags-y += -I$(srctree)/drivers/media/dvb-core | |||
41 | ccflags-y += -I$(srctree)/drivers/media/dvb-frontends | 41 | ccflags-y += -I$(srctree)/drivers/media/dvb-frontends |
42 | ccflags-y += -I$(srctree)/drivers/media/tuners | 42 | ccflags-y += -I$(srctree)/drivers/media/tuners |
43 | ccflags-y += -I$(srctree)/drivers/media/common | 43 | ccflags-y += -I$(srctree)/drivers/media/common |
44 | ccflags-y += -I$(srctree)/drivers/staging/media/rtl2832u_sdr | ||
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c index 61d196e8b3ab..dcbd392e6efc 100644 --- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c +++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include "rtl2830.h" | 25 | #include "rtl2830.h" |
26 | #include "rtl2832.h" | 26 | #include "rtl2832.h" |
27 | #include "rtl2832_sdr.h" | ||
28 | 27 | ||
29 | #include "qt1010.h" | 28 | #include "qt1010.h" |
30 | #include "mt2060.h" | 29 | #include "mt2060.h" |
@@ -36,6 +35,45 @@ | |||
36 | #include "tua9001.h" | 35 | #include "tua9001.h" |
37 | #include "r820t.h" | 36 | #include "r820t.h" |
38 | 37 | ||
38 | /* | ||
39 | * RTL2832_SDR module is in staging. That logic is added in order to avoid any | ||
40 | * hard dependency to drivers/staging/ directory as we want compile mainline | ||
41 | * driver even whole staging directory is missing. | ||
42 | */ | ||
43 | #include <media/v4l2-subdev.h> | ||
44 | |||
45 | #if IS_ENABLED(CONFIG_DVB_RTL2832_SDR) | ||
46 | struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe, | ||
47 | struct i2c_adapter *i2c, const struct rtl2832_config *cfg, | ||
48 | struct v4l2_subdev *sd); | ||
49 | #else | ||
50 | static inline struct dvb_frontend *rtl2832_sdr_attach(struct dvb_frontend *fe, | ||
51 | struct i2c_adapter *i2c, const struct rtl2832_config *cfg, | ||
52 | struct v4l2_subdev *sd) | ||
53 | { | ||
54 | return NULL; | ||
55 | } | ||
56 | #endif | ||
57 | |||
58 | #ifdef CONFIG_MEDIA_ATTACH | ||
59 | #define dvb_attach_sdr(FUNCTION, ARGS...) ({ \ | ||
60 | void *__r = NULL; \ | ||
61 | typeof(&FUNCTION) __a = symbol_request(FUNCTION); \ | ||
62 | if (__a) { \ | ||
63 | __r = (void *) __a(ARGS); \ | ||
64 | if (__r == NULL) \ | ||
65 | symbol_put(FUNCTION); \ | ||
66 | } \ | ||
67 | __r; \ | ||
68 | }) | ||
69 | |||
70 | #else | ||
71 | #define dvb_attach_sdr(FUNCTION, ARGS...) ({ \ | ||
72 | FUNCTION(ARGS); \ | ||
73 | }) | ||
74 | |||
75 | #endif | ||
76 | |||
39 | static int rtl28xxu_disable_rc; | 77 | static int rtl28xxu_disable_rc; |
40 | module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644); | 78 | module_param_named(disable_rc, rtl28xxu_disable_rc, int, 0644); |
41 | MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller"); | 79 | MODULE_PARM_DESC(disable_rc, "disable RTL2832U remote controller"); |
@@ -908,7 +946,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
908 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 946 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
909 | 947 | ||
910 | /* attach SDR */ | 948 | /* attach SDR */ |
911 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | 949 | dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, |
912 | &rtl28xxu_rtl2832_fc0012_config, NULL); | 950 | &rtl28xxu_rtl2832_fc0012_config, NULL); |
913 | break; | 951 | break; |
914 | case TUNER_RTL2832_FC0013: | 952 | case TUNER_RTL2832_FC0013: |
@@ -920,7 +958,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
920 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 958 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
921 | 959 | ||
922 | /* attach SDR */ | 960 | /* attach SDR */ |
923 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | 961 | dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, |
924 | &rtl28xxu_rtl2832_fc0013_config, NULL); | 962 | &rtl28xxu_rtl2832_fc0013_config, NULL); |
925 | break; | 963 | break; |
926 | case TUNER_RTL2832_E4000: { | 964 | case TUNER_RTL2832_E4000: { |
@@ -951,7 +989,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
951 | i2c_set_adapdata(i2c_adap_internal, d); | 989 | i2c_set_adapdata(i2c_adap_internal, d); |
952 | 990 | ||
953 | /* attach SDR */ | 991 | /* attach SDR */ |
954 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], | 992 | dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], |
955 | i2c_adap_internal, | 993 | i2c_adap_internal, |
956 | &rtl28xxu_rtl2832_e4000_config, sd); | 994 | &rtl28xxu_rtl2832_e4000_config, sd); |
957 | } | 995 | } |
@@ -982,7 +1020,7 @@ static int rtl2832u_tuner_attach(struct dvb_usb_adapter *adap) | |||
982 | adap->fe[0]->ops.tuner_ops.get_rf_strength; | 1020 | adap->fe[0]->ops.tuner_ops.get_rf_strength; |
983 | 1021 | ||
984 | /* attach SDR */ | 1022 | /* attach SDR */ |
985 | dvb_attach(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, | 1023 | dvb_attach_sdr(rtl2832_sdr_attach, adap->fe[0], &d->i2c_adap, |
986 | &rtl28xxu_rtl2832_r820t_config, NULL); | 1024 | &rtl28xxu_rtl2832_r820t_config, NULL); |
987 | break; | 1025 | break; |
988 | case TUNER_RTL2832_R828D: | 1026 | case TUNER_RTL2832_R828D: |
diff --git a/drivers/media/usb/gspca/sonixb.c b/drivers/media/usb/gspca/sonixb.c index 7277dbd2afcd..ecbcb39feb71 100644 --- a/drivers/media/usb/gspca/sonixb.c +++ b/drivers/media/usb/gspca/sonixb.c | |||
@@ -1430,10 +1430,8 @@ static const struct usb_device_id device_table[] = { | |||
1430 | {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, | 1430 | {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, |
1431 | {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)}, | 1431 | {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)}, |
1432 | {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)}, | 1432 | {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)}, |
1433 | #if !IS_ENABLED(CONFIG_USB_SN9C102) | ||
1434 | {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)}, | 1433 | {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)}, |
1435 | {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)}, | 1434 | {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)}, |
1436 | #endif | ||
1437 | {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */ | 1435 | {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */ |
1438 | {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)}, | 1436 | {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)}, |
1439 | {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)}, | 1437 | {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)}, |
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index 04b2daf567be..7e2411c36419 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c | |||
@@ -178,6 +178,9 @@ struct v4l2_create_buffers32 { | |||
178 | 178 | ||
179 | static int __get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) | 179 | static int __get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) |
180 | { | 180 | { |
181 | if (get_user(kp->type, &up->type)) | ||
182 | return -EFAULT; | ||
183 | |||
181 | switch (kp->type) { | 184 | switch (kp->type) { |
182 | case V4L2_BUF_TYPE_VIDEO_CAPTURE: | 185 | case V4L2_BUF_TYPE_VIDEO_CAPTURE: |
183 | case V4L2_BUF_TYPE_VIDEO_OUTPUT: | 186 | case V4L2_BUF_TYPE_VIDEO_OUTPUT: |
@@ -204,17 +207,16 @@ static int __get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __us | |||
204 | 207 | ||
205 | static int get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) | 208 | static int get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) |
206 | { | 209 | { |
207 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_format32)) || | 210 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_format32))) |
208 | get_user(kp->type, &up->type)) | 211 | return -EFAULT; |
209 | return -EFAULT; | ||
210 | return __get_v4l2_format32(kp, up); | 212 | return __get_v4l2_format32(kp, up); |
211 | } | 213 | } |
212 | 214 | ||
213 | static int get_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up) | 215 | static int get_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up) |
214 | { | 216 | { |
215 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_create_buffers32)) || | 217 | if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_create_buffers32)) || |
216 | copy_from_user(kp, up, offsetof(struct v4l2_create_buffers32, format.fmt))) | 218 | copy_from_user(kp, up, offsetof(struct v4l2_create_buffers32, format))) |
217 | return -EFAULT; | 219 | return -EFAULT; |
218 | return __get_v4l2_format32(&kp->format, &up->format); | 220 | return __get_v4l2_format32(&kp->format, &up->format); |
219 | } | 221 | } |
220 | 222 | ||
diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 8c101cbbee97..acc8184c46cd 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c | |||
@@ -1247,9 +1247,18 @@ static int vpfe_stop_streaming(struct vb2_queue *vq) | |||
1247 | struct vpfe_fh *fh = vb2_get_drv_priv(vq); | 1247 | struct vpfe_fh *fh = vb2_get_drv_priv(vq); |
1248 | struct vpfe_video_device *video = fh->video; | 1248 | struct vpfe_video_device *video = fh->video; |
1249 | 1249 | ||
1250 | if (!vb2_is_streaming(vq)) | ||
1251 | return 0; | ||
1252 | /* release all active buffers */ | 1250 | /* release all active buffers */ |
1251 | if (video->cur_frm == video->next_frm) { | ||
1252 | vb2_buffer_done(&video->cur_frm->vb, VB2_BUF_STATE_ERROR); | ||
1253 | } else { | ||
1254 | if (video->cur_frm != NULL) | ||
1255 | vb2_buffer_done(&video->cur_frm->vb, | ||
1256 | VB2_BUF_STATE_ERROR); | ||
1257 | if (video->next_frm != NULL) | ||
1258 | vb2_buffer_done(&video->next_frm->vb, | ||
1259 | VB2_BUF_STATE_ERROR); | ||
1260 | } | ||
1261 | |||
1253 | while (!list_empty(&video->dma_queue)) { | 1262 | while (!list_empty(&video->dma_queue)) { |
1254 | video->next_frm = list_entry(video->dma_queue.next, | 1263 | video->next_frm = list_entry(video->dma_queue.next, |
1255 | struct vpfe_cap_buffer, list); | 1264 | struct vpfe_cap_buffer, list); |
diff --git a/drivers/staging/media/sn9c102/sn9c102_devtable.h b/drivers/staging/media/sn9c102/sn9c102_devtable.h index b3d2cc729657..4ba569258498 100644 --- a/drivers/staging/media/sn9c102/sn9c102_devtable.h +++ b/drivers/staging/media/sn9c102/sn9c102_devtable.h | |||
@@ -48,10 +48,8 @@ static const struct usb_device_id sn9c102_id_table[] = { | |||
48 | { SN9C102_USB_DEVICE(0x0c45, 0x600d, BRIDGE_SN9C102), }, | 48 | { SN9C102_USB_DEVICE(0x0c45, 0x600d, BRIDGE_SN9C102), }, |
49 | /* { SN9C102_USB_DEVICE(0x0c45, 0x6011, BRIDGE_SN9C102), }, OV6650 */ | 49 | /* { SN9C102_USB_DEVICE(0x0c45, 0x6011, BRIDGE_SN9C102), }, OV6650 */ |
50 | { SN9C102_USB_DEVICE(0x0c45, 0x6019, BRIDGE_SN9C102), }, | 50 | { SN9C102_USB_DEVICE(0x0c45, 0x6019, BRIDGE_SN9C102), }, |
51 | #endif | ||
52 | { SN9C102_USB_DEVICE(0x0c45, 0x6024, BRIDGE_SN9C102), }, | 51 | { SN9C102_USB_DEVICE(0x0c45, 0x6024, BRIDGE_SN9C102), }, |
53 | { SN9C102_USB_DEVICE(0x0c45, 0x6025, BRIDGE_SN9C102), }, | 52 | { SN9C102_USB_DEVICE(0x0c45, 0x6025, BRIDGE_SN9C102), }, |
54 | #if !defined CONFIG_USB_GSPCA_SONIXB && !defined CONFIG_USB_GSPCA_SONIXB_MODULE | ||
55 | { SN9C102_USB_DEVICE(0x0c45, 0x6028, BRIDGE_SN9C102), }, | 53 | { SN9C102_USB_DEVICE(0x0c45, 0x6028, BRIDGE_SN9C102), }, |
56 | { SN9C102_USB_DEVICE(0x0c45, 0x6029, BRIDGE_SN9C102), }, | 54 | { SN9C102_USB_DEVICE(0x0c45, 0x6029, BRIDGE_SN9C102), }, |
57 | { SN9C102_USB_DEVICE(0x0c45, 0x602a, BRIDGE_SN9C102), }, | 55 | { SN9C102_USB_DEVICE(0x0c45, 0x602a, BRIDGE_SN9C102), }, |