Commit 70a3067d authored by Linus Torvalds's avatar Linus Torvalds

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:
 "Another set of fixes for Kernel 3.10.

  This series contain:
   - two Kbuild fixes for randconfig
   - a buffer overflow when using rtl28xuu with r820t tuner
   - one clk fixup on exynos4-is driver"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [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
parents b8ff768b bb69ee27
...@@ -136,9 +136,9 @@ config DVB_NET ...@@ -136,9 +136,9 @@ config DVB_NET
# This Kconfig option is used by both PCI and USB drivers # This Kconfig option is used by both PCI and USB drivers
config TTPCI_EEPROM config TTPCI_EEPROM
tristate tristate
depends on I2C depends on I2C
default n default n
source "drivers/media/dvb-core/Kconfig" source "drivers/media/dvb-core/Kconfig"
...@@ -189,6 +189,12 @@ config MEDIA_SUBDRV_AUTOSELECT ...@@ -189,6 +189,12 @@ config MEDIA_SUBDRV_AUTOSELECT
If unsure say Y. If unsure say Y.
config MEDIA_ATTACH
bool
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
depends on MODULES
default MODULES
source "drivers/media/i2c/Kconfig" source "drivers/media/i2c/Kconfig"
source "drivers/media/tuners/Kconfig" source "drivers/media/tuners/Kconfig"
source "drivers/media/dvb-frontends/Kconfig" source "drivers/media/dvb-frontends/Kconfig"
......
...@@ -834,23 +834,11 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -834,23 +834,11 @@ static int fimc_is_probe(struct platform_device *pdev)
goto err_clk; goto err_clk;
} }
pm_runtime_enable(dev); pm_runtime_enable(dev);
/*
* Enable only the ISP power domain, keep FIMC-IS clocks off until
* the whole clock tree is configured. The ISP power domain needs
* be active in order to acces any CMU_ISP clock registers.
*/
ret = pm_runtime_get_sync(dev);
if (ret < 0)
goto err_irq;
ret = fimc_is_setup_clocks(is);
pm_runtime_put_sync(dev);
ret = pm_runtime_get_sync(dev);
if (ret < 0) if (ret < 0)
goto err_irq; goto err_irq;
is->clk_init = true;
is->alloc_ctx = vb2_dma_contig_init_ctx(dev); is->alloc_ctx = vb2_dma_contig_init_ctx(dev);
if (IS_ERR(is->alloc_ctx)) { if (IS_ERR(is->alloc_ctx)) {
ret = PTR_ERR(is->alloc_ctx); ret = PTR_ERR(is->alloc_ctx);
...@@ -872,6 +860,8 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -872,6 +860,8 @@ static int fimc_is_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto err_dfs; goto err_dfs;
pm_runtime_put_sync(dev);
dev_dbg(dev, "FIMC-IS registered successfully\n"); dev_dbg(dev, "FIMC-IS registered successfully\n");
return 0; return 0;
...@@ -891,9 +881,11 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -891,9 +881,11 @@ static int fimc_is_probe(struct platform_device *pdev)
static int fimc_is_runtime_resume(struct device *dev) static int fimc_is_runtime_resume(struct device *dev)
{ {
struct fimc_is *is = dev_get_drvdata(dev); struct fimc_is *is = dev_get_drvdata(dev);
int ret;
if (!is->clk_init) ret = fimc_is_setup_clocks(is);
return 0; if (ret)
return ret;
return fimc_is_enable_clocks(is); return fimc_is_enable_clocks(is);
} }
...@@ -902,9 +894,7 @@ static int fimc_is_runtime_suspend(struct device *dev) ...@@ -902,9 +894,7 @@ static int fimc_is_runtime_suspend(struct device *dev)
{ {
struct fimc_is *is = dev_get_drvdata(dev); struct fimc_is *is = dev_get_drvdata(dev);
if (is->clk_init) fimc_is_disable_clocks(is);
fimc_is_disable_clocks(is);
return 0; return 0;
} }
......
...@@ -264,7 +264,6 @@ struct fimc_is { ...@@ -264,7 +264,6 @@ struct fimc_is {
spinlock_t slock; spinlock_t slock;
struct clk *clocks[ISS_CLKS_MAX]; struct clk *clocks[ISS_CLKS_MAX];
bool clk_init;
void __iomem *regs; void __iomem *regs;
void __iomem *pmu_regs; void __iomem *pmu_regs;
int irq; int irq;
......
s5p-jpeg-objs := jpeg-core.o s5p-jpeg-objs := jpeg-core.o
obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) := s5p-jpeg.o obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG) += s5p-jpeg.o
obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) := s5p-mfc.o obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC) += s5p-mfc.o
s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o s5p-mfc-y += s5p_mfc.o s5p_mfc_intr.o
s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o s5p-mfc-y += s5p_mfc_dec.o s5p_mfc_enc.o
s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o s5p-mfc-y += s5p_mfc_ctrl.o s5p_mfc_pm.o
......
config MEDIA_ATTACH
bool "Load and attach frontend and tuner driver modules as needed"
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
depends on MODULES
default y if !EXPERT
help
Remove the static dependency of DVB card drivers on all
frontend modules for all possible card variants. Instead,
allow the card drivers to only load the frontend modules
they require.
Also, tuner module will automatically load a tuner driver
when needed, for analog mode.
This saves several KBytes of memory.
Note: You will need module-init-tools v3.2 or later for this feature.
If unsure say Y.
# Analog TV tuners, auto-loaded via tuner.ko # Analog TV tuners, auto-loaded via tuner.ko
config MEDIA_TUNER config MEDIA_TUNER
tristate tristate
......
...@@ -376,7 +376,7 @@ static int rtl2832u_read_config(struct dvb_usb_device *d) ...@@ -376,7 +376,7 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)
struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf}; struct rtl28xxu_req req_mxl5007t = {0xd9c0, CMD_I2C_RD, 1, buf};
struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf}; struct rtl28xxu_req req_e4000 = {0x02c8, CMD_I2C_RD, 1, buf};
struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf}; struct rtl28xxu_req req_tda18272 = {0x00c0, CMD_I2C_RD, 2, buf};
struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 5, buf}; struct rtl28xxu_req req_r820t = {0x0034, CMD_I2C_RD, 1, buf};
dev_dbg(&d->udev->dev, "%s:\n", __func__); dev_dbg(&d->udev->dev, "%s:\n", __func__);
...@@ -481,9 +481,9 @@ static int rtl2832u_read_config(struct dvb_usb_device *d) ...@@ -481,9 +481,9 @@ static int rtl2832u_read_config(struct dvb_usb_device *d)
goto found; goto found;
} }
/* check R820T by reading tuner stats at I2C addr 0x1a */ /* check R820T ID register; reg=00 val=69 */
ret = rtl28xxu_ctrl_msg(d, &req_r820t); ret = rtl28xxu_ctrl_msg(d, &req_r820t);
if (ret == 0) { if (ret == 0 && buf[0] == 0x69) {
priv->tuner = TUNER_RTL2832_R820T; priv->tuner = TUNER_RTL2832_R820T;
priv->tuner_name = "R820T"; priv->tuner_name = "R820T";
goto found; goto found;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment