From 3addbb8075c00e2a2408c192bd1002dead26b2aa Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 5 Nov 2009 13:26:32 -0300 Subject: V4L/DVB (13321): radio-gemtek-pci: fix double mutex_lock Double mutexlock found by the Linux Driver Verification project and reported by Alexander Strakh. Signed-off-by: Hans Verkuil CC: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/radio-gemtek-pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c index c3f579de6e7..c6cf1166186 100644 --- a/drivers/media/radio/radio-gemtek-pci.c +++ b/drivers/media/radio/radio-gemtek-pci.c @@ -181,12 +181,10 @@ static void gemtek_pci_mute(struct gemtek_pci *card) static void gemtek_pci_unmute(struct gemtek_pci *card) { - mutex_lock(&card->lock); if (card->mute) { gemtek_pci_setfrequency(card, card->current_frequency); card->mute = false; } - mutex_unlock(&card->lock); } static int gemtek_pci_getsignal(struct gemtek_pci *card) -- cgit v1.2.3 From f39c1ab3c3878f1a50ca129e55d17ae63215fcbe Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 9 Nov 2009 16:11:34 -0300 Subject: V4L/DVB (13343): v4l: add more missing linux/sched.h includes Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/mx1_camera.c | 1 + drivers/media/video/mx3_camera.c | 1 + drivers/media/video/sh_mobile_ceu_camera.c | 1 + drivers/media/video/videobuf-dma-contig.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index 5f37952c75c..72802291e81 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index dff2e5e2d8c..7db82bdf6f3 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 2f78b4f263f..55afe3e98e1 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index 635ffc7b039..c3065c4bcba 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media/video/videobuf-dma-contig.c @@ -19,6 +19,7 @@ #include #include #include +#include #include struct videobuf_dma_contig_memory { -- cgit v1.2.3 From 64ff9ba5f1d771e8405ec766c31f6b32c9708285 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 9 Nov 2009 16:12:37 -0300 Subject: V4L/DVB (13344): soc-camera: properly initialise the device object when reusing Commit ef373189f62413803b7b816c972fc154c488cdc0 "fix use-after-free Oops, resulting from a driver-core API change" fixed the Oops, but didn't correct missing device object initialisation. This patch makes unloading and reloading of soc-camera host- and client-drivers possible again. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/soc_camera.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index 36e617bd13c..95fdeb23c2c 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -1097,6 +1097,13 @@ static int default_s_crop(struct soc_camera_device *icd, struct v4l2_crop *a) return v4l2_subdev_call(sd, video, s_crop, a); } +static void soc_camera_device_init(struct device *dev, void *pdata) +{ + dev->platform_data = pdata; + dev->bus = &soc_camera_bus_type; + dev->release = dummy_release; +} + int soc_camera_host_register(struct soc_camera_host *ici) { struct soc_camera_host *ix; @@ -1158,6 +1165,7 @@ void soc_camera_host_unregister(struct soc_camera_host *ici) list_for_each_entry(icd, &devices, list) { if (icd->iface == ici->nr) { + void *pdata = icd->dev.platform_data; /* The bus->remove will be called */ device_unregister(&icd->dev); /* @@ -1169,6 +1177,7 @@ void soc_camera_host_unregister(struct soc_camera_host *ici) * device private data. */ memset(&icd->dev, 0, sizeof(icd->dev)); + soc_camera_device_init(&icd->dev, pdata); } } @@ -1200,10 +1209,7 @@ static int soc_camera_device_register(struct soc_camera_device *icd) * man, stay reasonable... */ return -ENOMEM; - icd->devnum = num; - icd->dev.bus = &soc_camera_bus_type; - - icd->dev.release = dummy_release; + icd->devnum = num; icd->use_count = 0; icd->host_priv = NULL; mutex_init(&icd->video_lock); @@ -1311,12 +1317,13 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) icd->iface = icl->bus_id; icd->pdev = &pdev->dev; platform_set_drvdata(pdev, icd); - icd->dev.platform_data = icl; ret = soc_camera_device_register(icd); if (ret < 0) goto escdevreg; + soc_camera_device_init(&icd->dev, icl); + icd->user_width = DEFAULT_WIDTH; icd->user_height = DEFAULT_HEIGHT; -- cgit v1.2.3 From 055e05a08b462feabbd6b7a33fd2b9f1f23d4476 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 9 Nov 2009 16:13:24 -0300 Subject: V4L/DVB (13345): soc-camera: sh_mobile_ceu_camera: call pm_runtime_disable pm_runtime_disable is needed if it failed or removed Signed-off-by: Kuninori Morimoto Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/sh_mobile_ceu_camera.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index 55afe3e98e1..afdea0d26fc 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1724,10 +1724,12 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev) err = soc_camera_host_register(&pcdev->ici); if (err) - goto exit_free_irq; + goto exit_free_clk; return 0; +exit_free_clk: + pm_runtime_disable(&pdev->dev); exit_free_irq: free_irq(pcdev->irq, pcdev); exit_release_mem: @@ -1748,6 +1750,7 @@ static int __devexit sh_mobile_ceu_remove(struct platform_device *pdev) struct sh_mobile_ceu_dev, ici); soc_camera_host_unregister(soc_host); + pm_runtime_disable(&pdev->dev); free_irq(pcdev->irq, pcdev); if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) dma_release_declared_memory(&pdev->dev); -- cgit v1.2.3 From 28f4ddd1e8e341907d8f4f4b9ebf9f441f30420a Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Sun, 4 Oct 2009 12:59:35 -0300 Subject: V4L/DVB (13366): em28xx: fix Reddo DVB-C USB TV Box GPIO Set device GPIOs only once. There is no need for .dvb_gpio to select between analog and digital because device is digital only. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/em28xx/em28xx-cards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index bdb249bd9d5..c0fd5c6feea 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c @@ -1584,8 +1584,8 @@ struct em28xx_board em28xx_boards[] = { [EM2870_BOARD_REDDO_DVB_C_USB_BOX] = { .name = "Reddo DVB-C USB TV Box", .tuner_type = TUNER_ABSENT, + .tuner_gpio = reddo_dvb_c_usb_box, .has_dvb = 1, - .dvb_gpio = reddo_dvb_c_usb_box, }, }; const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); -- cgit v1.2.3 From 934949d816004ff66e21adbab225e9cb7f20015a Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 9 Nov 2009 09:05:11 -0300 Subject: V4L/DVB (13371): davinci: remove stray duplicate config pointer The vpif_config struct was renamed to vpif_display_config, but there is still a stray vpif_config *config pointer in vpif_display.c, preventing it from compiling. Remove this old duplicate pointer. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/davinci/vpif_display.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/video/davinci/vpif_display.c b/drivers/media/video/davinci/vpif_display.c index c015da813dd..d14cfb200ed 100644 --- a/drivers/media/video/davinci/vpif_display.c +++ b/drivers/media/video/davinci/vpif_display.c @@ -1426,7 +1426,6 @@ static __init int vpif_probe(struct platform_device *pdev) struct vpif_display_config *config; int i, j = 0, k, q, m, err = 0; struct i2c_adapter *i2c_adap; - struct vpif_config *config; struct common_obj *common; struct channel_obj *ch; struct video_device *vfd; -- cgit v1.2.3 From 4b3fa3c486f53ff267505b115ebf611726217da8 Mon Sep 17 00:00:00 2001 From: Olivier Lorin Date: Sat, 3 Oct 2009 19:09:10 -0300 Subject: V4L/DVB (13372a): MAINTAINERS: addition of gspca_gl860 driver MAINTAINERS: addition of gspca_gl860 driver - addition of gspca_gl860 driver Signed-off-by: Olivier Lorin Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c824b4d6275..4982eb0baed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2312,6 +2312,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git S: Maintained F: drivers/media/video/gspca/finepix.c +GSPCA GL860 SUBDRIVER +M: Olivier Lorin +L: linux-media@vger.kernel.org +T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git +S: Maintained +F: drivers/media/video/gspca/gl860/ + GSPCA M5602 SUBDRIVER M: Erik Andren L: linux-media@vger.kernel.org -- cgit v1.2.3 From d02b217a719a8c4debf66ea81ea1b95dbb00e265 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 20 Nov 2009 16:16:52 -0300 Subject: V4L/DVB (13412): SMS_SIANO_MDTV should depend on HAS_DMA When building for Sun 3: drivers/built-in.o: In function `smscore_unregister_device': drivers/media/dvb/siano/smscoreapi.c:723: undefined reference to `dma_free_coherent' drivers/built-in.o: In function `smscore_register_device': drivers/media/dvb/siano/smscoreapi.c:365: undefined reference to `dma_alloc_coherent' Signed-off-by: Geert Uytterhoeven Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/siano/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb/siano/Kconfig b/drivers/media/dvb/siano/Kconfig index 8c1aed77ea3..85a222c4eaa 100644 --- a/drivers/media/dvb/siano/Kconfig +++ b/drivers/media/dvb/siano/Kconfig @@ -4,7 +4,7 @@ config SMS_SIANO_MDTV tristate "Siano SMS1xxx based MDTV receiver" - depends on DVB_CORE && INPUT + depends on DVB_CORE && INPUT && HAS_DMA ---help--- Choose Y or M here if you have MDTV receiver with a Siano chipset. -- cgit v1.2.3 From 0bc3518019f917a370935055f07698a4e9b3ea20 Mon Sep 17 00:00:00 2001 From: Robert Lowery Date: Sun, 8 Nov 2009 00:00:11 -0300 Subject: V4L/DVB (13436): cxusb: Fix hang on DViCO FusionHDTV DVB-T Dual Digital 4 (rev 1) Address yet another regression introduced by the introduction of the zl10353 disable_i2c_gate field. djh - I unmangled the patch which apparently got screwed up in the user's email client. Signed-off-by: Robert Lowery Signed-off-by: Devin Heitmueller CC: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/cxusb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index f65591fb7ce..2a53dd096ee 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c @@ -663,6 +663,14 @@ static struct zl10353_config cxusb_zl10353_xc3028_config = { .parallel_ts = 1, }; +static struct zl10353_config cxusb_zl10353_xc3028_config_no_i2c_gate = { + .demod_address = 0x0f, + .if2 = 45600, + .no_tuner = 1, + .parallel_ts = 1, + .disable_i2c_gate_ctrl = 1, +}; + static struct mt352_config cxusb_mt352_xc3028_config = { .demod_address = 0x0f, .if2 = 4560, @@ -894,7 +902,7 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); if ((adap->fe = dvb_attach(zl10353_attach, - &cxusb_zl10353_xc3028_config, + &cxusb_zl10353_xc3028_config_no_i2c_gate, &adap->dev->i2c_adap)) == NULL) return -EIO; -- cgit v1.2.3 From 9807362e4768cf807c9cfad3c10243020365d1ce Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 25 Nov 2009 14:32:57 -0300 Subject: V4L/DVB (13481): sh_mobile_ceu_camera: fix compile warning Trivial fix for this compile warning: v4l/sh_mobile_ceu_camera.c:1789: warning: label 'exit_free_irq' defined but not used Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/sh_mobile_ceu_camera.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c index afdea0d26fc..9c8b7c7b89e 100644 --- a/drivers/media/video/sh_mobile_ceu_camera.c +++ b/drivers/media/video/sh_mobile_ceu_camera.c @@ -1730,7 +1730,6 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev) exit_free_clk: pm_runtime_disable(&pdev->dev); -exit_free_irq: free_irq(pcdev->irq, pcdev); exit_release_mem: if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) -- cgit v1.2.3 From 361c95119a60adb7f84946af648b7c87cdc55e17 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 26 Nov 2009 12:22:11 -0300 Subject: V4L/DVB (13530): Fix wrong parameter order in memset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Edwin Török found the following: In function ‘memset’, inlined from ‘ir_input_init’ at drivers/media/common/ir-functions.c:67: /home/edwin/builds/linux-2.6/arch/x86/include/asm/string_64.h:61: warning: call to ‘__warn_memset_zero_len’ declared with attribute warning: memset used with constant zero length parameter; this could be due to transposed parameters memset(ir->ir_codes, sizeof(ir->ir_codes), 0); In actual practice the only caller I can find happens to already have cleared the buffer before calling ir_input_init. Signed-off-by: Alan Cox Signed-off-by: Mauro Carvalho Chehab --- drivers/media/common/ir-functions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c index 655474b29e2..abd4791acb0 100644 --- a/drivers/media/common/ir-functions.c +++ b/drivers/media/common/ir-functions.c @@ -64,7 +64,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, ir->ir_type = ir_type; - memset(ir->ir_codes, sizeof(ir->ir_codes), 0); + memset(ir->ir_codes, 0, sizeof(ir->ir_codes)); /* * FIXME: This is a temporary workaround to use the new IR tables -- cgit v1.2.3 From 7924326fef03e9992c118a42aa148c4f824a4097 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 30 Nov 2009 17:37:20 -0200 Subject: staging/go7007: Fix compilation by re-adding the missing s2250-loader.h As pointed by Stefan Lippers-Hollmann , Commit: fd9a40da1db372833e1af6397d2f6c94ceff3dad broke s2250 compilation. This patch re-adds the missing s2250-loader.h Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/go7007/s2250-loader.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 drivers/staging/go7007/s2250-loader.h diff --git a/drivers/staging/go7007/s2250-loader.h b/drivers/staging/go7007/s2250-loader.h new file mode 100644 index 00000000000..b7c301af16c --- /dev/null +++ b/drivers/staging/go7007/s2250-loader.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2005-2006 Micronas USA Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (Version 2) as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + */ + +#ifndef _S2250_LOADER_H_ +#define _S2250_LOADER_H_ + +extern int s2250loader_init(void); +extern void s2250loader_cleanup(void); + +#endif -- cgit v1.2.3 From e49bd72f9cfba9f0d0204f961d036cd0c7e37f2e Mon Sep 17 00:00:00 2001 From: Pete Eberlein Date: Sun, 15 Nov 2009 08:14:14 -0300 Subject: V4L/DVB (13372): staging/go7007: fix mutex function usage for s2250 Fix mutex function usage, which was overlooked in a previous patch. Signed-off-by: Pete Eberlein Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/go7007/s2250-board.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c index 8c85a9c3665..f4a6541c3e6 100644 --- a/drivers/staging/go7007/s2250-board.c +++ b/drivers/staging/go7007/s2250-board.c @@ -261,7 +261,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val) memset(buf, 0xcd, 6); usb = go->hpi_context; - if (down_interruptible(&usb->i2c_lock) != 0) { + if (mutex_lock_interruptible(&usb->i2c_lock) != 0) { printk(KERN_INFO "i2c lock failed\n"); kfree(buf); return -EINTR; @@ -270,7 +270,7 @@ static int read_reg_fp(struct i2c_client *client, u16 addr, u16 *val) kfree(buf); return -EFAULT; } - up(&usb->i2c_lock); + mutex_unlock(&usb->i2c_lock); *val = (buf[0] << 8) | buf[1]; kfree(buf); -- cgit v1.2.3