aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-06-25 06:24:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-25 06:25:09 -0400
commit188af63c0af2d7ef395bc94e3efa173f34dae03d (patch)
treec2648c26ac37b836140ad499e0f5c0eec5586f5f /drivers/media
parent05959be7b646e8755a9339ad13e3b87849249f90 (diff)
parentbb69ee27b96110c509d5b92c9ee541d81a821706 (diff)
Merge branch 'v4l_for_linus' into patchwork
* v4l_for_linus: [media] Fix build when drivers are builtin and frontend modules [media] s5p makefiles: don't override other selections on obj-[ym] [media] exynos4-is: Fix FIMC-IS clocks initialization [media] rtl28xxu: fix buffer overflow when probing Rafael Micro r820t tuner Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/Kconfig12
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is.c26
-rw-r--r--drivers/media/platform/exynos4-is/fimc-is.h1
-rw-r--r--drivers/media/platform/s5p-jpeg/Makefile2
-rw-r--r--drivers/media/platform/s5p-mfc/Makefile2
-rw-r--r--drivers/media/tuners/Kconfig20
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c6
7 files changed, 22 insertions, 47 deletions
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig
index 7f5a7cac6dc7..8270388e2a0d 100644
--- a/drivers/media/Kconfig
+++ b/drivers/media/Kconfig
@@ -136,9 +136,9 @@ config DVB_NET
136 136
137# This Kconfig option is used by both PCI and USB drivers 137# This Kconfig option is used by both PCI and USB drivers
138config TTPCI_EEPROM 138config TTPCI_EEPROM
139 tristate 139 tristate
140 depends on I2C 140 depends on I2C
141 default n 141 default n
142 142
143source "drivers/media/dvb-core/Kconfig" 143source "drivers/media/dvb-core/Kconfig"
144 144
@@ -189,6 +189,12 @@ config MEDIA_SUBDRV_AUTOSELECT
189 189
190 If unsure say Y. 190 If unsure say Y.
191 191
192config MEDIA_ATTACH
193 bool
194 depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
195 depends on MODULES
196 default MODULES
197
192source "drivers/media/i2c/Kconfig" 198source "drivers/media/i2c/Kconfig"
193source "drivers/media/tuners/Kconfig" 199source "drivers/media/tuners/Kconfig"
194source "drivers/media/dvb-frontends/Kconfig" 200source "drivers/media/dvb-frontends/Kconfig"
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 290146ecfb8a..967f6a939340 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -834,23 +834,11 @@ static int fimc_is_probe(struct platform_device *pdev)
834 goto err_clk; 834 goto err_clk;
835 } 835 }
836 pm_runtime_enable(dev); 836 pm_runtime_enable(dev);
837 /*
838 * Enable only the ISP power domain, keep FIMC-IS clocks off until
839 * the whole clock tree is configured. The ISP power domain needs
840 * be active in order to acces any CMU_ISP clock registers.
841 */
842 ret = pm_runtime_get_sync(dev);
843 if (ret < 0)
844 goto err_irq;
845
846 ret = fimc_is_setup_clocks(is);
847 pm_runtime_put_sync(dev);
848 837
838 ret = pm_runtime_get_sync(dev);
849 if (ret < 0) 839 if (ret < 0)
850 goto err_irq; 840 goto err_irq;
851 841
852 is->clk_init = true;
853
854 is->alloc_ctx = vb2_dma_contig_init_ctx(dev); 842 is->alloc_ctx = vb2_dma_contig_init_ctx(dev);
855 if (IS_ERR(is->alloc_ctx)) { 843 if (IS_ERR(is->alloc_ctx)) {
856 ret = PTR_ERR(is->alloc_ctx); 844 ret = PTR_ERR(is->alloc_ctx);
@@ -872,6 +860,8 @@ static int fimc_is_probe(struct platform_device *pdev)
872 if (ret < 0) 860 if (ret < 0)
873 goto err_dfs; 861 goto err_dfs;
874 862
863 pm_runtime_put_sync(dev);
864
875 dev_dbg(dev, "FIMC-IS registered successfully\n"); 865 dev_dbg(dev, "FIMC-IS registered successfully\n");
876 return 0; 866 return 0;
877 867
@@ -891,9 +881,11 @@ err_clk:
891static int fimc_is_runtime_resume(struct device *dev) 881static int fimc_is_runtime_resume(struct device *dev)
892{ 882{
893 struct fimc_is *is = dev_get_drvdata(dev); 883 struct fimc_is *is = dev_get_drvdata(dev);
884 int ret;
894 885
895 if (!is->clk_init) 886 ret = fimc_is_setup_clocks(is);
896 return 0; 887 if (ret)
888 return ret;
897 889
898 return fimc_is_enable_clocks(is); 890 return fimc_is_enable_clocks(is);
899} 891}
@@ -902,9 +894,7 @@ static int fimc_is_runtime_suspend(struct device *dev)
902{ 894{
903 struct fimc_is *is = dev_get_drvdata(dev); 895 struct fimc_is *is = dev_get_drvdata(dev);
904 896
905 if (is->clk_init) 897 fimc_is_disable_clocks(is);
906 fimc_is_disable_clocks(is);
907
908 return 0; 898 return 0;
909} 899}
910 900
diff --git a/drivers/media/platform/exynos4-is/fimc-is.h b/drivers/media/platform/exynos4-is/fimc-is.h
index 4b0eccb68480..08fa518c34f7 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.h
+++ b/drivers/media/platform/exynos4-is/fimc-is.h
@@ -263,7 +263,6 @@ struct fimc_is {
263 spinlock_t slock; 263 spinlock_t slock;
264 264
265 struct clk *clocks[ISS_CLKS_MAX]; 265 struct clk *clocks[ISS_CLKS_MAX];
266 bool clk_init;
267 void __iomem *regs; 266 void __iomem *regs;
268 void __iomem *pmu_regs; 267 void __iomem *pmu_regs;
269 int irq; 268 int irq;
diff --git a/drivers/media/platform/s5p-jpeg/Makefile b/drivers/media/platform/s5p-jpeg/Makefile
index ddc2900d88a2..d18cb5edd2d5 100644
--- a/drivers/media/platform/s5p-jpeg/Makefile
+++ b/drivers/media/platform/s5p-jpeg/Makefile
@@ -1,2 +1,2 @@
1s5p-jpeg-objs := jpeg-core.o 1s5p-jpeg-objs := jpeg-core.o
2obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) := s5p-jpeg.o 2obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) += s5p-jpeg.o
diff --git a/drivers/media/platform/s5p-mfc/Makefile b/drivers/media/platform/s5p-mfc/Makefile
index 379008c6d09a..15f59b324fef 100644
--- a/drivers/media/platform/s5p-mfc/Makefile
+++ b/drivers/media/platform/s5p-mfc/Makefile
@@ -1,4 +1,4 @@
1obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) := s5p-mfc.o 1obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc.o
2s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o 2s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o
3s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o 3s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o
4s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o 4s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o
diff --git a/drivers/media/tuners/Kconfig b/drivers/media/tuners/Kconfig
index f6768cad001a..15665debc572 100644
--- a/drivers/media/tuners/Kconfig
+++ b/drivers/media/tuners/Kconfig
@@ -1,23 +1,3 @@
1config MEDIA_ATTACH
2 bool "Load and attach frontend and tuner driver modules as needed"
3 depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
4 depends on MODULES
5 default y if !EXPERT
6 help
7 Remove the static dependency of DVB card drivers on all
8 frontend modules for all possible card variants. Instead,
9 allow the card drivers to only load the frontend modules
10 they require.
11
12 Also, tuner module will automatically load a tuner driver
13 when needed, for analog mode.
14
15 This saves several KBytes of memory.
16
17 Note: You will need module-init-tools v3.2 or later for this feature.
18
19 If unsure say Y.
20
21# Analog TV tuners, auto-loaded via tuner.ko 1# Analog TV tuners, auto-loaded via tuner.ko
22config MEDIA_TUNER 2config MEDIA_TUNER
23 tristate 3 tristate
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 9a3c044fda3b..c0cd0848631b 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -376,7 +376,7 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)
376 struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf}; 376 struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf};
377 struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf}; 377 struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf};
378 struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf}; 378 struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf};
379 struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 5, buf}; 379 struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 1, buf};
380 380
381 dev_dbg(&d->udev->dev, "%s:\n", __func__); 381 dev_dbg(&d->udev->dev, "%s:\n", __func__);
382 382
@@ -481,9 +481,9 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)
481 goto found; 481 goto found;
482 } 482 }
483 483
484 /* check R820T by reading tuner stats at I2C addr 0x1a */ 484 /* check R820T ID register; reg=00 val=69 */
485 ret = rtl28xxu_ctrl_msg(d, &req_r820t); 485 ret = rtl28xxu_ctrl_msg(d, &req_r820t);
486 if (ret == 0) { 486 if (ret == 0 && buf[0] == 0x69) {
487 priv->tuner = TUNER_RTL2832_R820T; 487 priv->tuner = TUNER_RTL2832_R820T;
488 priv->tuner_name = "R820T"; 488 priv->tuner_name = "R820T";
489 goto found; 489 goto found;