aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-11-20 15:46:04 -0500
committerTakashi Iwai <tiwai@suse.de>2014-11-20 15:46:04 -0500
commita69862d8d04e4877965cc938140c9f8e6da0b827 (patch)
tree667cace5c2fad872871e4d24d0c895664f0e0bc6 /drivers/media
parent0f32fd1900e6b972f289416dbd75e92772b630cb (diff)
parent01cb156edbbd4e6c4fd8db0d05f18c62c424f9aa (diff)
Merge branch 'for-linus' into test/usb-resume
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/common/saa7146/saa7146_core.c6
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c6
-rw-r--r--drivers/media/dvb-frontends/ds3000.c7
-rw-r--r--drivers/media/dvb-frontends/sp2.c4
-rw-r--r--drivers/media/dvb-frontends/tc90522.c18
-rw-r--r--drivers/media/pci/cx23885/cx23885-dvb.c3
-rw-r--r--drivers/media/pci/tw68/Kconfig1
-rw-r--r--drivers/media/pci/tw68/tw68-core.c2
-rw-r--r--drivers/media/platform/Kconfig6
-rw-r--r--drivers/media/platform/exynos4-is/Kconfig2
-rw-r--r--drivers/media/platform/exynos4-is/fimc-core.c2
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c6
-rw-r--r--drivers/media/platform/s5p-tv/Kconfig2
-rw-r--r--drivers/media/platform/vivid/Kconfig5
-rw-r--r--drivers/media/platform/vivid/vivid-core.c11
-rw-r--r--drivers/media/platform/vivid/vivid-tpg.c2
-rw-r--r--drivers/media/radio/wl128x/fmdrv_common.c2
-rw-r--r--drivers/media/rc/imon.c3
-rw-r--r--drivers/media/rc/ir-hix5hd2.c2
-rw-r--r--drivers/media/rc/ir-rc5-decoder.c2
-rw-r--r--drivers/media/rc/rc-ir-raw.c1
-rw-r--r--drivers/media/rc/rc-main.c2
-rw-r--r--drivers/media/tuners/xc5000.c2
-rw-r--r--drivers/media/usb/dvb-usb-v2/af9035.c6
-rw-r--r--drivers/media/usb/dvb-usb-v2/anysee.c6
-rw-r--r--drivers/media/usb/em28xx/em28xx-core.c2
-rw-r--r--drivers/media/usb/em28xx/em28xx-input.c4
-rw-r--r--drivers/media/usb/hackrf/hackrf.c2
-rw-r--r--drivers/media/usb/usbvision/usbvision-video.c2
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c1
-rw-r--r--drivers/media/usb/uvc/uvc_video.c2
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h1
-rw-r--r--drivers/media/v4l2-core/videobuf-dma-contig.c9
33 files changed, 81 insertions, 51 deletions
diff --git a/drivers/media/common/saa7146/saa7146_core.c b/drivers/media/common/saa7146/saa7146_core.c
index 97afee672d07..4418119cf707 100644
--- a/drivers/media/common/saa7146/saa7146_core.c
+++ b/drivers/media/common/saa7146/saa7146_core.c
@@ -364,6 +364,9 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
364 goto out; 364 goto out;
365 } 365 }
366 366
367 /* create a nice device name */
368 sprintf(dev->name, "saa7146 (%d)", saa7146_num);
369
367 DEB_EE("pci:%p\n", pci); 370 DEB_EE("pci:%p\n", pci);
368 371
369 err = pci_enable_device(pci); 372 err = pci_enable_device(pci);
@@ -438,9 +441,6 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
438 441
439 /* the rest + print status message */ 442 /* the rest + print status message */
440 443
441 /* create a nice device name */
442 sprintf(dev->name, "saa7146 (%d)", saa7146_num);
443
444 pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n", 444 pr_info("found saa7146 @ mem %p (revision %d, irq %d) (0x%04x,0x%04x)\n",
445 dev->mem, dev->revision, pci->irq, 445 dev->mem, dev->revision, pci->irq,
446 pci->subsystem_vendor, pci->subsystem_device); 446 pci->subsystem_vendor, pci->subsystem_device);
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index b8579ee68bd6..2cf30576bf39 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -962,6 +962,11 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
962 case SYS_ATSC: 962 case SYS_ATSC:
963 c->modulation = VSB_8; 963 c->modulation = VSB_8;
964 break; 964 break;
965 case SYS_ISDBS:
966 c->symbol_rate = 28860000;
967 c->rolloff = ROLLOFF_35;
968 c->bandwidth_hz = c->symbol_rate / 100 * 135;
969 break;
965 default: 970 default:
966 c->modulation = QAM_AUTO; 971 c->modulation = QAM_AUTO;
967 break; 972 break;
@@ -2072,6 +2077,7 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
2072 break; 2077 break;
2073 case SYS_DVBS: 2078 case SYS_DVBS:
2074 case SYS_TURBO: 2079 case SYS_TURBO:
2080 case SYS_ISDBS:
2075 rolloff = 135; 2081 rolloff = 135;
2076 break; 2082 break;
2077 case SYS_DVBS2: 2083 case SYS_DVBS2:
diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
index 335daeff91b9..9d0d0347758f 100644
--- a/drivers/media/dvb-frontends/ds3000.c
+++ b/drivers/media/dvb-frontends/ds3000.c
@@ -864,6 +864,13 @@ struct dvb_frontend *ds3000_attach(const struct ds3000_config *config,
864 memcpy(&state->frontend.ops, &ds3000_ops, 864 memcpy(&state->frontend.ops, &ds3000_ops,
865 sizeof(struct dvb_frontend_ops)); 865 sizeof(struct dvb_frontend_ops));
866 state->frontend.demodulator_priv = state; 866 state->frontend.demodulator_priv = state;
867
868 /*
869 * Some devices like T480 starts with voltage on. Be sure
870 * to turn voltage off during init, as this can otherwise
871 * interfere with Unicable SCR systems.
872 */
873 ds3000_set_voltage(&state->frontend, SEC_VOLTAGE_OFF);
867 return &state->frontend; 874 return &state->frontend;
868 875
869error3: 876error3:
diff --git a/drivers/media/dvb-frontends/sp2.c b/drivers/media/dvb-frontends/sp2.c
index 9b684d5c8f91..15bf4318cb74 100644
--- a/drivers/media/dvb-frontends/sp2.c
+++ b/drivers/media/dvb-frontends/sp2.c
@@ -266,7 +266,7 @@ int sp2_ci_poll_slot_status(struct dvb_ca_en50221 *en50221,
266 return s->status; 266 return s->status;
267} 267}
268 268
269int sp2_init(struct sp2 *s) 269static int sp2_init(struct sp2 *s)
270{ 270{
271 int ret = 0; 271 int ret = 0;
272 u8 buf; 272 u8 buf;
@@ -348,7 +348,7 @@ err:
348 return ret; 348 return ret;
349} 349}
350 350
351int sp2_exit(struct i2c_client *client) 351static int sp2_exit(struct i2c_client *client)
352{ 352{
353 struct sp2 *s; 353 struct sp2 *s;
354 354
diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c
index d9905fb52f84..b35d65c9cc05 100644
--- a/drivers/media/dvb-frontends/tc90522.c
+++ b/drivers/media/dvb-frontends/tc90522.c
@@ -216,32 +216,30 @@ static int tc90522s_get_frontend(struct dvb_frontend *fe)
216 c->delivery_system = SYS_ISDBS; 216 c->delivery_system = SYS_ISDBS;
217 217
218 layers = 0; 218 layers = 0;
219 ret = reg_read(state, 0xe8, val, 3); 219 ret = reg_read(state, 0xe6, val, 5);
220 if (ret == 0) { 220 if (ret == 0) {
221 int slots;
222 u8 v; 221 u8 v;
223 222
223 c->stream_id = val[0] << 8 | val[1];
224
224 /* high/single layer */ 225 /* high/single layer */
225 v = (val[0] & 0x70) >> 4; 226 v = (val[2] & 0x70) >> 4;
226 c->modulation = (v == 7) ? PSK_8 : QPSK; 227 c->modulation = (v == 7) ? PSK_8 : QPSK;
227 c->fec_inner = fec_conv_sat[v]; 228 c->fec_inner = fec_conv_sat[v];
228 c->layer[0].fec = c->fec_inner; 229 c->layer[0].fec = c->fec_inner;
229 c->layer[0].modulation = c->modulation; 230 c->layer[0].modulation = c->modulation;
230 c->layer[0].segment_count = val[1] & 0x3f; /* slots */ 231 c->layer[0].segment_count = val[3] & 0x3f; /* slots */
231 232
232 /* low layer */ 233 /* low layer */
233 v = (val[0] & 0x07); 234 v = (val[2] & 0x07);
234 c->layer[1].fec = fec_conv_sat[v]; 235 c->layer[1].fec = fec_conv_sat[v];
235 if (v == 0) /* no low layer */ 236 if (v == 0) /* no low layer */
236 c->layer[1].segment_count = 0; 237 c->layer[1].segment_count = 0;
237 else 238 else
238 c->layer[1].segment_count = val[2] & 0x3f; /* slots */ 239 c->layer[1].segment_count = val[4] & 0x3f; /* slots */
239 /* actually, BPSK if v==1, but not defined in fe_modulation_t */ 240 /* actually, BPSK if v==1, but not defined in fe_modulation_t */
240 c->layer[1].modulation = QPSK; 241 c->layer[1].modulation = QPSK;
241 layers = (v > 0) ? 2 : 1; 242 layers = (v > 0) ? 2 : 1;
242
243 slots = c->layer[0].segment_count + c->layer[1].segment_count;
244 c->symbol_rate = 28860000 * slots / 48;
245 } 243 }
246 244
247 /* statistics */ 245 /* statistics */
@@ -363,7 +361,7 @@ static int tc90522t_get_frontend(struct dvb_frontend *fe)
363 u8 v; 361 u8 v;
364 362
365 c->isdbt_partial_reception = val[0] & 0x01; 363 c->isdbt_partial_reception = val[0] & 0x01;
366 c->isdbt_sb_mode = (val[0] & 0xc0) == 0x01; 364 c->isdbt_sb_mode = (val[0] & 0xc0) == 0x40;
367 365
368 /* layer A */ 366 /* layer A */
369 v = (val[2] & 0x78) >> 3; 367 v = (val[2] & 0x78) >> 3;
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 13734b8c7917..4cb90317ff45 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -1600,6 +1600,7 @@ static int dvb_register(struct cx23885_tsport *port)
1600 break; 1600 break;
1601 1601
1602 /* attach tuner */ 1602 /* attach tuner */
1603 memset(&m88ts2022_config, 0, sizeof(m88ts2022_config));
1603 m88ts2022_config.fe = fe0->dvb.frontend; 1604 m88ts2022_config.fe = fe0->dvb.frontend;
1604 m88ts2022_config.clock = 27000000; 1605 m88ts2022_config.clock = 27000000;
1605 memset(&info, 0, sizeof(struct i2c_board_info)); 1606 memset(&info, 0, sizeof(struct i2c_board_info));
@@ -1635,6 +1636,7 @@ static int dvb_register(struct cx23885_tsport *port)
1635 /* port c - terrestrial/cable */ 1636 /* port c - terrestrial/cable */
1636 case 2: 1637 case 2:
1637 /* attach frontend */ 1638 /* attach frontend */
1639 memset(&si2168_config, 0, sizeof(si2168_config));
1638 si2168_config.i2c_adapter = &adapter; 1640 si2168_config.i2c_adapter = &adapter;
1639 si2168_config.fe = &fe0->dvb.frontend; 1641 si2168_config.fe = &fe0->dvb.frontend;
1640 si2168_config.ts_mode = SI2168_TS_SERIAL; 1642 si2168_config.ts_mode = SI2168_TS_SERIAL;
@@ -1654,6 +1656,7 @@ static int dvb_register(struct cx23885_tsport *port)
1654 port->i2c_client_demod = client_demod; 1656 port->i2c_client_demod = client_demod;
1655 1657
1656 /* attach tuner */ 1658 /* attach tuner */
1659 memset(&si2157_config, 0, sizeof(si2157_config));
1657 si2157_config.fe = fe0->dvb.frontend; 1660 si2157_config.fe = fe0->dvb.frontend;
1658 memset(&info, 0, sizeof(struct i2c_board_info)); 1661 memset(&info, 0, sizeof(struct i2c_board_info));
1659 strlcpy(info.type, "si2157", I2C_NAME_SIZE); 1662 strlcpy(info.type, "si2157", I2C_NAME_SIZE);
diff --git a/drivers/media/pci/tw68/Kconfig b/drivers/media/pci/tw68/Kconfig
index 5425ba1e320d..95d5d5202048 100644
--- a/drivers/media/pci/tw68/Kconfig
+++ b/drivers/media/pci/tw68/Kconfig
@@ -1,7 +1,6 @@
1config VIDEO_TW68 1config VIDEO_TW68
2 tristate "Techwell tw68x Video For Linux" 2 tristate "Techwell tw68x Video For Linux"
3 depends on VIDEO_DEV && PCI && VIDEO_V4L2 3 depends on VIDEO_DEV && PCI && VIDEO_V4L2
4 select I2C_ALGOBIT
5 select VIDEOBUF2_DMA_SG 4 select VIDEOBUF2_DMA_SG
6 ---help--- 5 ---help---
7 Support for Techwell tw68xx based frame grabber boards. 6 Support for Techwell tw68xx based frame grabber boards.
diff --git a/drivers/media/pci/tw68/tw68-core.c b/drivers/media/pci/tw68/tw68-core.c
index a6fb48cf7aae..63f0b64057cb 100644
--- a/drivers/media/pci/tw68/tw68-core.c
+++ b/drivers/media/pci/tw68/tw68-core.c
@@ -306,7 +306,7 @@ static int tw68_initdev(struct pci_dev *pci_dev,
306 306
307 /* get irq */ 307 /* get irq */
308 err = devm_request_irq(&pci_dev->dev, pci_dev->irq, tw68_irq, 308 err = devm_request_irq(&pci_dev->dev, pci_dev->irq, tw68_irq,
309 IRQF_SHARED | IRQF_DISABLED, dev->name, dev); 309 IRQF_SHARED, dev->name, dev);
310 if (err < 0) { 310 if (err < 0) {
311 pr_err("%s: can't get IRQ %d\n", 311 pr_err("%s: can't get IRQ %d\n",
312 dev->name, pci_dev->irq); 312 dev->name, pci_dev->irq);
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index bee9074ebc13..3aac88f1d54a 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -166,7 +166,7 @@ config VIDEO_MEM2MEM_DEINTERLACE
166config VIDEO_SAMSUNG_S5P_G2D 166config VIDEO_SAMSUNG_S5P_G2D
167 tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver" 167 tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver"
168 depends on VIDEO_DEV && VIDEO_V4L2 168 depends on VIDEO_DEV && VIDEO_V4L2
169 depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST 169 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
170 depends on HAS_DMA 170 depends on HAS_DMA
171 select VIDEOBUF2_DMA_CONTIG 171 select VIDEOBUF2_DMA_CONTIG
172 select V4L2_MEM2MEM_DEV 172 select V4L2_MEM2MEM_DEV
@@ -178,7 +178,7 @@ config VIDEO_SAMSUNG_S5P_G2D
178config VIDEO_SAMSUNG_S5P_JPEG 178config VIDEO_SAMSUNG_S5P_JPEG
179 tristate "Samsung S5P/Exynos3250/Exynos4 JPEG codec driver" 179 tristate "Samsung S5P/Exynos3250/Exynos4 JPEG codec driver"
180 depends on VIDEO_DEV && VIDEO_V4L2 180 depends on VIDEO_DEV && VIDEO_V4L2
181 depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST 181 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
182 depends on HAS_DMA 182 depends on HAS_DMA
183 select VIDEOBUF2_DMA_CONTIG 183 select VIDEOBUF2_DMA_CONTIG
184 select V4L2_MEM2MEM_DEV 184 select V4L2_MEM2MEM_DEV
@@ -189,7 +189,7 @@ config VIDEO_SAMSUNG_S5P_JPEG
189config VIDEO_SAMSUNG_S5P_MFC 189config VIDEO_SAMSUNG_S5P_MFC
190 tristate "Samsung S5P MFC Video Codec" 190 tristate "Samsung S5P MFC Video Codec"
191 depends on VIDEO_DEV && VIDEO_V4L2 191 depends on VIDEO_DEV && VIDEO_V4L2
192 depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST 192 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
193 depends on HAS_DMA 193 depends on HAS_DMA
194 select VIDEOBUF2_DMA_CONTIG 194 select VIDEOBUF2_DMA_CONTIG
195 default n 195 default n
diff --git a/drivers/media/platform/exynos4-is/Kconfig b/drivers/media/platform/exynos4-is/Kconfig
index 77c951237744..b7b2e472240a 100644
--- a/drivers/media/platform/exynos4-is/Kconfig
+++ b/drivers/media/platform/exynos4-is/Kconfig
@@ -2,7 +2,7 @@
2config VIDEO_SAMSUNG_EXYNOS4_IS 2config VIDEO_SAMSUNG_EXYNOS4_IS
3 bool "Samsung S5P/EXYNOS4 SoC series Camera Subsystem driver" 3 bool "Samsung S5P/EXYNOS4 SoC series Camera Subsystem driver"
4 depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API 4 depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
5 depends on (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST) 5 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
6 depends on OF && COMMON_CLK 6 depends on OF && COMMON_CLK
7 help 7 help
8 Say Y here to enable camera host interface devices for 8 Say Y here to enable camera host interface devices for
diff --git a/drivers/media/platform/exynos4-is/fimc-core.c b/drivers/media/platform/exynos4-is/fimc-core.c
index b70fd996d794..aee92d908e49 100644
--- a/drivers/media/platform/exynos4-is/fimc-core.c
+++ b/drivers/media/platform/exynos4-is/fimc-core.c
@@ -832,6 +832,7 @@ err:
832 return -ENXIO; 832 return -ENXIO;
833} 833}
834 834
835#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
835static int fimc_m2m_suspend(struct fimc_dev *fimc) 836static int fimc_m2m_suspend(struct fimc_dev *fimc)
836{ 837{
837 unsigned long flags; 838 unsigned long flags;
@@ -870,6 +871,7 @@ static int fimc_m2m_resume(struct fimc_dev *fimc)
870 871
871 return 0; 872 return 0;
872} 873}
874#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
873 875
874static const struct of_device_id fimc_of_match[]; 876static const struct of_device_id fimc_of_match[];
875 877
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index e525a7c8d885..6fcc7f072ace 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -893,7 +893,7 @@ static bool s5p_jpeg_parse_hdr(struct s5p_jpeg_q_data *result,
893 unsigned long buffer, unsigned long size, 893 unsigned long buffer, unsigned long size,
894 struct s5p_jpeg_ctx *ctx) 894 struct s5p_jpeg_ctx *ctx)
895{ 895{
896 int c, components, notfound; 896 int c, components = 0, notfound;
897 unsigned int height, width, word, subsampling = 0; 897 unsigned int height, width, word, subsampling = 0;
898 long length; 898 long length;
899 struct s5p_jpeg_buffer jpeg_buffer; 899 struct s5p_jpeg_buffer jpeg_buffer;
@@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev)
2632 return 0; 2632 return 0;
2633} 2633}
2634 2634
2635#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP)
2635static int s5p_jpeg_runtime_suspend(struct device *dev) 2636static int s5p_jpeg_runtime_suspend(struct device *dev)
2636{ 2637{
2637 struct s5p_jpeg *jpeg = dev_get_drvdata(dev); 2638 struct s5p_jpeg *jpeg = dev_get_drvdata(dev);
@@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev)
2681 2682
2682 return 0; 2683 return 0;
2683} 2684}
2685#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */
2684 2686
2687#ifdef CONFIG_PM_SLEEP
2685static int s5p_jpeg_suspend(struct device *dev) 2688static int s5p_jpeg_suspend(struct device *dev)
2686{ 2689{
2687 if (pm_runtime_suspended(dev)) 2690 if (pm_runtime_suspended(dev))
@@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev)
2697 2700
2698 return s5p_jpeg_runtime_resume(dev); 2701 return s5p_jpeg_runtime_resume(dev);
2699} 2702}
2703#endif
2700 2704
2701static const struct dev_pm_ops s5p_jpeg_pm_ops = { 2705static const struct dev_pm_ops s5p_jpeg_pm_ops = {
2702 SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume) 2706 SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)
diff --git a/drivers/media/platform/s5p-tv/Kconfig b/drivers/media/platform/s5p-tv/Kconfig
index a9d56f8936b4..beb180e71ba0 100644
--- a/drivers/media/platform/s5p-tv/Kconfig
+++ b/drivers/media/platform/s5p-tv/Kconfig
@@ -9,7 +9,7 @@
9config VIDEO_SAMSUNG_S5P_TV 9config VIDEO_SAMSUNG_S5P_TV
10 bool "Samsung TV driver for S5P platform" 10 bool "Samsung TV driver for S5P platform"
11 depends on PM_RUNTIME 11 depends on PM_RUNTIME
12 depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST 12 depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
13 default n 13 default n
14 ---help--- 14 ---help---
15 Say Y here to enable selecting the TV output devices for 15 Say Y here to enable selecting the TV output devices for
diff --git a/drivers/media/platform/vivid/Kconfig b/drivers/media/platform/vivid/Kconfig
index d71139a2ae00..c3090932f06d 100644
--- a/drivers/media/platform/vivid/Kconfig
+++ b/drivers/media/platform/vivid/Kconfig
@@ -1,8 +1,11 @@
1config VIDEO_VIVID 1config VIDEO_VIVID
2 tristate "Virtual Video Test Driver" 2 tristate "Virtual Video Test Driver"
3 depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 3 depends on VIDEO_DEV && VIDEO_V4L2 && !SPARC32 && !SPARC64 && FB
4 select FONT_SUPPORT 4 select FONT_SUPPORT
5 select FONT_8x16 5 select FONT_8x16
6 select FB_CFB_FILLRECT
7 select FB_CFB_COPYAREA
8 select FB_CFB_IMAGEBLIT
6 select VIDEOBUF2_VMALLOC 9 select VIDEOBUF2_VMALLOC
7 default n 10 default n
8 ---help--- 11 ---help---
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
index 2c61a62ab48b..686c3c2ad05b 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -100,11 +100,9 @@ MODULE_PARM_DESC(ccs_out_mode, " output crop/compose/scale mode:\n"
100 "\t\t bit 0=crop, 1=compose, 2=scale,\n" 100 "\t\t bit 0=crop, 1=compose, 2=scale,\n"
101 "\t\t -1=user-controlled (default)"); 101 "\t\t -1=user-controlled (default)");
102 102
103static unsigned multiplanar[VIVID_MAX_DEVS]; 103static unsigned multiplanar[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 1 };
104module_param_array(multiplanar, uint, NULL, 0444); 104module_param_array(multiplanar, uint, NULL, 0444);
105MODULE_PARM_DESC(multiplanar, " 0 (default) is alternating single and multiplanar devices,\n" 105MODULE_PARM_DESC(multiplanar, " 1 (default) creates a single planar device, 2 creates a multiplanar device.");
106 "\t\t 1 is single planar devices,\n"
107 "\t\t 2 is multiplanar devices");
108 106
109/* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */ 107/* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */
110static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d }; 108static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d };
@@ -669,10 +667,7 @@ static int __init vivid_create_instance(int inst)
669 /* start detecting feature set */ 667 /* start detecting feature set */
670 668
671 /* do we use single- or multi-planar? */ 669 /* do we use single- or multi-planar? */
672 if (multiplanar[inst] == 0) 670 dev->multiplanar = multiplanar[inst] > 1;
673 dev->multiplanar = inst & 1;
674 else
675 dev->multiplanar = multiplanar[inst] > 1;
676 v4l2_info(&dev->v4l2_dev, "using %splanar format API\n", 671 v4l2_info(&dev->v4l2_dev, "using %splanar format API\n",
677 dev->multiplanar ? "multi" : "single "); 672 dev->multiplanar ? "multi" : "single ");
678 673
diff --git a/drivers/media/platform/vivid/vivid-tpg.c b/drivers/media/platform/vivid/vivid-tpg.c
index 0c6fa53fa646..cbcd6250e7b2 100644
--- a/drivers/media/platform/vivid/vivid-tpg.c
+++ b/drivers/media/platform/vivid/vivid-tpg.c
@@ -136,7 +136,7 @@ int tpg_alloc(struct tpg_data *tpg, unsigned max_w)
136 tpg->black_line[plane] = vzalloc(max_w * pixelsz); 136 tpg->black_line[plane] = vzalloc(max_w * pixelsz);
137 if (!tpg->black_line[plane]) 137 if (!tpg->black_line[plane])
138 return -ENOMEM; 138 return -ENOMEM;
139 tpg->random_line[plane] = vzalloc(max_w * pixelsz); 139 tpg->random_line[plane] = vzalloc(max_w * 2 * pixelsz);
140 if (!tpg->random_line[plane]) 140 if (!tpg->random_line[plane])
141 return -ENOMEM; 141 return -ENOMEM;
142 } 142 }
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c
index 6f28f6e02ea5..704397f3c106 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -1256,7 +1256,7 @@ static int fm_download_firmware(struct fmdev *fmdev, const u8 *fw_name)
1256 fmerr("Unable to read firmware(%s) content\n", fw_name); 1256 fmerr("Unable to read firmware(%s) content\n", fw_name);
1257 return ret; 1257 return ret;
1258 } 1258 }
1259 fmdbg("Firmware(%s) length : %d bytes\n", fw_name, fw_entry->size); 1259 fmdbg("Firmware(%s) length : %zu bytes\n", fw_name, fw_entry->size);
1260 1260
1261 fw_data = (void *)fw_entry->data; 1261 fw_data = (void *)fw_entry->data;
1262 fw_len = fw_entry->size; 1262 fw_len = fw_entry->size;
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index b8837dd39bb2..65f80b8b9f7a 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -1678,7 +1678,8 @@ static void imon_incoming_packet(struct imon_context *ictx,
1678 if (press_type == 0) 1678 if (press_type == 0)
1679 rc_keyup(ictx->rdev); 1679 rc_keyup(ictx->rdev);
1680 else { 1680 else {
1681 if (ictx->rc_type == RC_BIT_RC6_MCE) 1681 if (ictx->rc_type == RC_BIT_RC6_MCE ||
1682 ictx->rc_type == RC_BIT_OTHER)
1682 rc_keydown(ictx->rdev, 1683 rc_keydown(ictx->rdev,
1683 ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER, 1684 ictx->rc_type == RC_BIT_RC6_MCE ? RC_TYPE_RC6_MCE : RC_TYPE_OTHER,
1684 ictx->rc_scancode, ictx->rc_toggle); 1685 ictx->rc_scancode, ictx->rc_toggle);
diff --git a/drivers/media/rc/ir-hix5hd2.c b/drivers/media/rc/ir-hix5hd2.c
index 08bbd4f508cd..b0df62961c14 100644
--- a/drivers/media/rc/ir-hix5hd2.c
+++ b/drivers/media/rc/ir-hix5hd2.c
@@ -297,7 +297,7 @@ static int hix5hd2_ir_remove(struct platform_device *pdev)
297 return 0; 297 return 0;
298} 298}
299 299
300#ifdef CONFIG_PM 300#ifdef CONFIG_PM_SLEEP
301static int hix5hd2_ir_suspend(struct device *dev) 301static int hix5hd2_ir_suspend(struct device *dev)
302{ 302{
303 struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev); 303 struct hix5hd2_ir_priv *priv = dev_get_drvdata(dev);
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c
index 2ef763928ca4..84fa6e9b59a1 100644
--- a/drivers/media/rc/ir-rc5-decoder.c
+++ b/drivers/media/rc/ir-rc5-decoder.c
@@ -53,7 +53,7 @@ static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev)
53 u32 scancode; 53 u32 scancode;
54 enum rc_type protocol; 54 enum rc_type protocol;
55 55
56 if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X))) 56 if (!(dev->enabled_protocols & (RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ)))
57 return 0; 57 return 0;
58 58
59 if (!is_timing_event(ev)) { 59 if (!is_timing_event(ev)) {
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index e8fff2add265..b732ac6a26d8 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -262,7 +262,6 @@ int ir_raw_event_register(struct rc_dev *dev)
262 return -ENOMEM; 262 return -ENOMEM;
263 263
264 dev->raw->dev = dev; 264 dev->raw->dev = dev;
265 dev->enabled_protocols = ~0;
266 dev->change_protocol = change_protocol; 265 dev->change_protocol = change_protocol;
267 rc = kfifo_alloc(&dev->raw->kfifo, 266 rc = kfifo_alloc(&dev->raw->kfifo,
268 sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE, 267 sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE,
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index a7991c7d010a..8d3b74c5a717 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1421,6 +1421,8 @@ int rc_register_device(struct rc_dev *dev)
1421 1421
1422 if (dev->change_protocol) { 1422 if (dev->change_protocol) {
1423 u64 rc_type = (1 << rc_map->rc_type); 1423 u64 rc_type = (1 << rc_map->rc_type);
1424 if (dev->driver_type == RC_DRIVER_IR_RAW)
1425 rc_type |= RC_BIT_LIRC;
1424 rc = dev->change_protocol(dev, &rc_type); 1426 rc = dev->change_protocol(dev, &rc_type);
1425 if (rc < 0) 1427 if (rc < 0)
1426 goto out_raw; 1428 goto out_raw;
diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c
index e44c8aba6074..803a0e63d47e 100644
--- a/drivers/media/tuners/xc5000.c
+++ b/drivers/media/tuners/xc5000.c
@@ -1333,9 +1333,9 @@ static int xc5000_release(struct dvb_frontend *fe)
1333 1333
1334 if (priv) { 1334 if (priv) {
1335 cancel_delayed_work(&priv->timer_sleep); 1335 cancel_delayed_work(&priv->timer_sleep);
1336 hybrid_tuner_release_state(priv);
1337 if (priv->firmware) 1336 if (priv->firmware)
1338 release_firmware(priv->firmware); 1337 release_firmware(priv->firmware);
1338 hybrid_tuner_release_state(priv);
1339 } 1339 }
1340 1340
1341 mutex_unlock(&xc5000_list_mutex); 1341 mutex_unlock(&xc5000_list_mutex);
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
index 00758c83eec7..1896ab218b11 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -193,8 +193,8 @@ static int af9035_wr_reg_mask(struct dvb_usb_device *d, u32 reg, u8 val,
193 return af9035_wr_regs(d, reg, &val, 1); 193 return af9035_wr_regs(d, reg, &val, 1);
194} 194}
195 195
196static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr, 196static int af9035_add_i2c_dev(struct dvb_usb_device *d, const char *type,
197 void *platform_data, struct i2c_adapter *adapter) 197 u8 addr, void *platform_data, struct i2c_adapter *adapter)
198{ 198{
199 int ret, num; 199 int ret, num;
200 struct state *state = d_to_priv(d); 200 struct state *state = d_to_priv(d);
@@ -221,7 +221,7 @@ static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
221 goto err; 221 goto err;
222 } 222 }
223 223
224 request_module(board_info.type); 224 request_module("%s", board_info.type);
225 225
226 /* register I2C device */ 226 /* register I2C device */
227 client = i2c_new_device(adapter, &board_info); 227 client = i2c_new_device(adapter, &board_info);
diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c
index d3c5f230e97a..ae917c042a52 100644
--- a/drivers/media/usb/dvb-usb-v2/anysee.c
+++ b/drivers/media/usb/dvb-usb-v2/anysee.c
@@ -630,8 +630,8 @@ error:
630 return ret; 630 return ret;
631} 631}
632 632
633static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr, 633static int anysee_add_i2c_dev(struct dvb_usb_device *d, const char *type,
634 void *platform_data) 634 u8 addr, void *platform_data)
635{ 635{
636 int ret, num; 636 int ret, num;
637 struct anysee_state *state = d_to_priv(d); 637 struct anysee_state *state = d_to_priv(d);
@@ -659,7 +659,7 @@ static int anysee_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
659 goto err; 659 goto err;
660 } 660 }
661 661
662 request_module(board_info.type); 662 request_module("%s", board_info.type);
663 663
664 /* register I2C device */ 664 /* register I2C device */
665 client = i2c_new_device(adapter, &board_info); 665 client = i2c_new_device(adapter, &board_info);
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
index b5e52fe7957a..901cf2b952d7 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -504,7 +504,7 @@ EXPORT_SYMBOL_GPL(em28xx_audio_analog_set);
504int em28xx_audio_setup(struct em28xx *dev) 504int em28xx_audio_setup(struct em28xx *dev)
505{ 505{
506 int vid1, vid2, feat, cfg; 506 int vid1, vid2, feat, cfg;
507 u32 vid; 507 u32 vid = 0;
508 u8 i2s_samplerates; 508 u8 i2s_samplerates;
509 509
510 if (dev->chip_id == CHIP_ID_EM2870 || 510 if (dev->chip_id == CHIP_ID_EM2870 ||
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index 581f6dad4ca9..23f8f6afa2e0 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -712,8 +712,10 @@ static int em28xx_ir_init(struct em28xx *dev)
712 em28xx_info("Registering input extension\n"); 712 em28xx_info("Registering input extension\n");
713 713
714 ir = kzalloc(sizeof(*ir), GFP_KERNEL); 714 ir = kzalloc(sizeof(*ir), GFP_KERNEL);
715 if (!ir)
716 return -ENOMEM;
715 rc = rc_allocate_device(); 717 rc = rc_allocate_device();
716 if (!ir || !rc) 718 if (!rc)
717 goto error; 719 goto error;
718 720
719 /* record handles to ourself */ 721 /* record handles to ourself */
diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c
index 328b5ba47a0a..fd1fa412e094 100644
--- a/drivers/media/usb/hackrf/hackrf.c
+++ b/drivers/media/usb/hackrf/hackrf.c
@@ -932,7 +932,7 @@ static int hackrf_set_bandwidth(struct hackrf_dev *dev)
932 dev->bandwidth->val = bandwidth; 932 dev->bandwidth->val = bandwidth;
933 dev->bandwidth->cur.val = bandwidth; 933 dev->bandwidth->cur.val = bandwidth;
934 934
935 dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth_lut[i].freq); 935 dev_dbg(dev->dev, "bandwidth selected=%d\n", bandwidth);
936 936
937 u16tmp = 0; 937 u16tmp = 0;
938 u16tmp |= ((bandwidth >> 0) & 0xff) << 0; 938 u16tmp |= ((bandwidth >> 0) & 0xff) << 0;
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 68bc9615660e..9bfa041e3316 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -446,6 +446,7 @@ static int usbvision_v4l2_close(struct file *file)
446 if (usbvision->remove_pending) { 446 if (usbvision->remove_pending) {
447 printk(KERN_INFO "%s: Final disconnect\n", __func__); 447 printk(KERN_INFO "%s: Final disconnect\n", __func__);
448 usbvision_release(usbvision); 448 usbvision_release(usbvision);
449 return 0;
449 } 450 }
450 mutex_unlock(&usbvision->v4l2_lock); 451 mutex_unlock(&usbvision->v4l2_lock);
451 452
@@ -1221,6 +1222,7 @@ static int usbvision_radio_close(struct file *file)
1221 if (usbvision->remove_pending) { 1222 if (usbvision->remove_pending) {
1222 printk(KERN_INFO "%s: Final disconnect\n", __func__); 1223 printk(KERN_INFO "%s: Final disconnect\n", __func__);
1223 usbvision_release(usbvision); 1224 usbvision_release(usbvision);
1225 return err_code;
1224 } 1226 }
1225 1227
1226 mutex_unlock(&usbvision->v4l2_lock); 1228 mutex_unlock(&usbvision->v4l2_lock);
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 60a8e2c3631e..378ae02e593b 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -318,7 +318,6 @@ static int uvc_v4l2_set_format(struct uvc_streaming *stream,
318 stream->ctrl = probe; 318 stream->ctrl = probe;
319 stream->cur_format = format; 319 stream->cur_format = format;
320 stream->cur_frame = frame; 320 stream->cur_frame = frame;
321 stream->frame_size = fmt->fmt.pix.sizeimage;
322 321
323done: 322done:
324 mutex_unlock(&stream->mutex); 323 mutex_unlock(&stream->mutex);
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 9ace520bb079..df81b9c4faf1 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1143,7 +1143,7 @@ static int uvc_video_encode_data(struct uvc_streaming *stream,
1143static void uvc_video_validate_buffer(const struct uvc_streaming *stream, 1143static void uvc_video_validate_buffer(const struct uvc_streaming *stream,
1144 struct uvc_buffer *buf) 1144 struct uvc_buffer *buf)
1145{ 1145{
1146 if (stream->frame_size != buf->bytesused && 1146 if (stream->ctrl.dwMaxVideoFrameSize != buf->bytesused &&
1147 !(stream->cur_format->flags & UVC_FMT_FLAG_COMPRESSED)) 1147 !(stream->cur_format->flags & UVC_FMT_FLAG_COMPRESSED))
1148 buf->error = 1; 1148 buf->error = 1;
1149} 1149}
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 6f676c29ec09..864ada740360 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -457,7 +457,6 @@ struct uvc_streaming {
457 struct uvc_format *def_format; 457 struct uvc_format *def_format;
458 struct uvc_format *cur_format; 458 struct uvc_format *cur_format;
459 struct uvc_frame *cur_frame; 459 struct uvc_frame *cur_frame;
460 size_t frame_size;
461 460
462 /* Protect access to ctrl, cur_format, cur_frame and hardware video 461 /* Protect access to ctrl, cur_format, cur_frame and hardware video
463 * probe control. 462 * probe control.
diff --git a/drivers/media/v4l2-core/videobuf-dma-contig.c b/drivers/media/v4l2-core/videobuf-dma-contig.c
index bf80f0f7dfb8..e02353e340dd 100644
--- a/drivers/media/v4l2-core/videobuf-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf-dma-contig.c
@@ -305,6 +305,15 @@ static int __videobuf_mmap_mapper(struct videobuf_queue *q,
305 /* Try to remap memory */ 305 /* Try to remap memory */
306 size = vma->vm_end - vma->vm_start; 306 size = vma->vm_end - vma->vm_start;
307 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 307 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
308
309 /* the "vm_pgoff" is just used in v4l2 to find the
310 * corresponding buffer data structure which is allocated
311 * earlier and it does not mean the offset from the physical
312 * buffer start address as usual. So set it to 0 to pass
313 * the sanity check in vm_iomap_memory().
314 */
315 vma->vm_pgoff = 0;
316
308 retval = vm_iomap_memory(vma, mem->dma_handle, size); 317 retval = vm_iomap_memory(vma, mem->dma_handle, size);
309 if (retval) { 318 if (retval) {
310 dev_err(q->dev, "mmap: remap failed with error %d. ", 319 dev_err(q->dev, "mmap: remap failed with error %d. ",