Skip to content

Commit

Permalink
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] soc-camera: Compile fixes for mx2-camera
  [media] SoC Camera: ov6650: minor cleanups
  [media] SOC Camera: OMAP1: typo fix
  [media] SoC Camera: OMAP1: update for recent videobuf changes
  [media] SoC Camera: OMAP1: update for recent framework changes
  [media] ARM mx3_camera: check for DMA engine type
  [media] tm6000: bugfix set tv standards
  [media] cafe_ccic: fix subdev configuration
  [media] saa7134: Fix autodetect for Behold A7 and H7 TV cards
  [media] v4l: kill the BKL
  [media] BZ#22292: dibx000_common: Restore i2c algo pointer
  • Loading branch information
Linus Torvalds committed Nov 13, 2010
2 parents 6b4e81d + 6b10192 commit c22cff0
Show file tree
Hide file tree
Showing 20 changed files with 86 additions and 92 deletions.
1 change: 0 additions & 1 deletion drivers/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ comment "Multimedia core support"

config VIDEO_DEV
tristate "Video For Linux"
depends on BKL # used in many drivers for ioctl handling, need to kill
---help---
V4L core support for video capture and overlay devices, webcams and
AM/FM radio cards.
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb/frontends/dibx000_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static int i2c_adapter_init(struct i2c_adapter *i2c_adap,
struct dibx000_i2c_master *mst)
{
strncpy(i2c_adap->name, name, sizeof(i2c_adap->name));
i2c_adap->algo = algo;
i2c_adap->algo_data = NULL;
i2c_set_adapdata(i2c_adap, mst);
if (i2c_add_adapter(i2c_adap) < 0)
Expand Down
5 changes: 3 additions & 2 deletions drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,8 +2065,9 @@ static int cafe_pci_probe(struct pci_dev *pdev,
sensor_cfg.clock_speed = 45;

cam->sensor_addr = 0x42;
cam->sensor = v4l2_i2c_new_subdev(&cam->v4l2_dev, &cam->i2c_adapter,
NULL, "ov7670", cam->sensor_addr, NULL);
cam->sensor = v4l2_i2c_new_subdev_cfg(&cam->v4l2_dev, &cam->i2c_adapter,
"ov7670", "ov7670", 0, &sensor_cfg, cam->sensor_addr,
NULL);
if (cam->sensor == NULL) {
ret = -ENODEV;
goto out_smbus;
Expand Down
6 changes: 2 additions & 4 deletions drivers/media/video/cx231xx/cx231xx-417.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/smp_lock.h>
#include <linux/vmalloc.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
Expand Down Expand Up @@ -1927,10 +1926,9 @@ static int mpeg_open(struct file *file)
dev = h;
}

if (dev == NULL) {
unlock_kernel();
if (dev == NULL)
return -ENODEV;
}

mutex_lock(&dev->lock);

/* allocate + initialize per filehandle data */
Expand Down
9 changes: 1 addition & 8 deletions drivers/media/video/cx23885/cx23885-417.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/smp_lock.h>
#include <linux/slab.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
Expand Down Expand Up @@ -1576,12 +1575,8 @@ static int mpeg_open(struct file *file)

/* allocate + initialize per filehandle data */
fh = kzalloc(sizeof(*fh), GFP_KERNEL);
if (NULL == fh) {
unlock_kernel();
if (!fh)
return -ENOMEM;
}

lock_kernel();

file->private_data = fh;
fh->dev = dev;
Expand All @@ -1592,8 +1587,6 @@ static int mpeg_open(struct file *file)
V4L2_FIELD_INTERLACED,
sizeof(struct cx23885_buffer),
fh, NULL);
unlock_kernel();

return 0;
}

Expand Down
5 changes: 0 additions & 5 deletions drivers/media/video/cx23885/cx23885-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/kmod.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/kthread.h>
Expand Down Expand Up @@ -743,8 +742,6 @@ static int video_open(struct file *file)
if (NULL == fh)
return -ENOMEM;

lock_kernel();

file->private_data = fh;
fh->dev = dev;
fh->radio = radio;
Expand All @@ -762,8 +759,6 @@ static int video_open(struct file *file)

dprintk(1, "post videobuf_queue_init()\n");

unlock_kernel();

return 0;
}

Expand Down
13 changes: 5 additions & 8 deletions drivers/media/video/mx2_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include <media/v4l2-common.h>
#include <media/v4l2-dev.h>
#include <media/videobuf-core.h>
#include <media/videobuf-dma-contig.h>
#include <media/soc_camera.h>
#include <media/soc_mediabus.h>
Expand Down Expand Up @@ -903,8 +904,6 @@ static int mx2_camera_set_crop(struct soc_camera_device *icd,
static int mx2_camera_set_fmt(struct soc_camera_device *icd,
struct v4l2_format *f)
{
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct mx2_camera_dev *pcdev = ici->priv;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
const struct soc_camera_format_xlate *xlate;
struct v4l2_pix_format *pix = &f->fmt.pix;
Expand Down Expand Up @@ -943,8 +942,6 @@ static int mx2_camera_set_fmt(struct soc_camera_device *icd,
static int mx2_camera_try_fmt(struct soc_camera_device *icd,
struct v4l2_format *f)
{
struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent);
struct mx2_camera_dev *pcdev = ici->priv;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
const struct soc_camera_format_xlate *xlate;
struct v4l2_pix_format *pix = &f->fmt.pix;
Expand Down Expand Up @@ -1024,13 +1021,13 @@ static int mx2_camera_querycap(struct soc_camera_host *ici,
return 0;
}

static int mx2_camera_reqbufs(struct soc_camera_file *icf,
static int mx2_camera_reqbufs(struct soc_camera_device *icd,
struct v4l2_requestbuffers *p)
{
int i;

for (i = 0; i < p->count; i++) {
struct mx2_buffer *buf = container_of(icf->vb_vidq.bufs[i],
struct mx2_buffer *buf = container_of(icd->vb_vidq.bufs[i],
struct mx2_buffer, vb);
INIT_LIST_HEAD(&buf->vb.queue);
}
Expand Down Expand Up @@ -1151,9 +1148,9 @@ static int __devinit mx27_camera_dma_init(struct platform_device *pdev,

static unsigned int mx2_camera_poll(struct file *file, poll_table *pt)
{
struct soc_camera_file *icf = file->private_data;
struct soc_camera_device *icd = file->private_data;

return videobuf_poll_stream(file, &icf->vb_vidq, pt);
return videobuf_poll_stream(file, &icd->vb_vidq, pt);
}

static struct soc_camera_host_ops mx2_soc_camera_host_ops = {
Expand Down
4 changes: 4 additions & 0 deletions drivers/media/video/mx3_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include <mach/ipu.h>
#include <mach/mx3_camera.h>
#include <mach/dma.h>

#define MX3_CAM_DRV_NAME "mx3-camera"

Expand Down Expand Up @@ -638,6 +639,9 @@ static bool chan_filter(struct dma_chan *chan, void *arg)
struct dma_chan_request *rq = arg;
struct mx3_camera_pdata *pdata;

if (!imx_dma_is_ipu(chan))
return false;

if (!rq)
return false;

Expand Down
16 changes: 8 additions & 8 deletions drivers/media/video/omap1_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ static void free_buffer(struct videobuf_queue *vq, struct omap1_cam_buf *buf,

BUG_ON(in_interrupt());

videobuf_waiton(vb, 0, 0);
videobuf_waiton(vq, vb, 0, 0);

if (vb_mode == OMAP1_CAM_DMA_CONTIG) {
videobuf_dma_contig_free(vq, vb);
Expand Down Expand Up @@ -504,7 +504,7 @@ static void omap1_videobuf_queue(struct videobuf_queue *vq,
* empty. Since the transfer of the DMA programming register set
* content to the DMA working register set is done automatically
* by the DMA hardware, this can pretty well happen while we
* are keeping the lock here. Levae fetching it from the queue
* are keeping the lock here. Leave fetching it from the queue
* to be done when a next DMA interrupt occures instead.
*/
return;
Expand Down Expand Up @@ -1365,12 +1365,12 @@ static void omap1_cam_init_videobuf(struct videobuf_queue *q,
videobuf_queue_dma_contig_init(q, &omap1_videobuf_ops,
icd->dev.parent, &pcdev->lock,
V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
sizeof(struct omap1_cam_buf), icd);
sizeof(struct omap1_cam_buf), icd, NULL);
else
videobuf_queue_sg_init(q, &omap1_videobuf_ops,
icd->dev.parent, &pcdev->lock,
V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
sizeof(struct omap1_cam_buf), icd);
sizeof(struct omap1_cam_buf), icd, NULL);

/* use videobuf mode (auto)selected with the module parameter */
pcdev->vb_mode = sg_mode ? OMAP1_CAM_DMA_SG : OMAP1_CAM_DMA_CONTIG;
Expand All @@ -1386,7 +1386,7 @@ static void omap1_cam_init_videobuf(struct videobuf_queue *q,
}
}

static int omap1_cam_reqbufs(struct soc_camera_file *icf,
static int omap1_cam_reqbufs(struct soc_camera_device *icd,
struct v4l2_requestbuffers *p)
{
int i;
Expand All @@ -1398,7 +1398,7 @@ static int omap1_cam_reqbufs(struct soc_camera_file *icf,
* it hadn't triggered
*/
for (i = 0; i < p->count; i++) {
struct omap1_cam_buf *buf = container_of(icf->vb_vidq.bufs[i],
struct omap1_cam_buf *buf = container_of(icd->vb_vidq.bufs[i],
struct omap1_cam_buf, vb);
buf->inwork = 0;
INIT_LIST_HEAD(&buf->vb.queue);
Expand Down Expand Up @@ -1485,10 +1485,10 @@ static int omap1_cam_set_bus_param(struct soc_camera_device *icd,

static unsigned int omap1_cam_poll(struct file *file, poll_table *pt)
{
struct soc_camera_file *icf = file->private_data;
struct soc_camera_device *icd = file->private_data;
struct omap1_cam_buf *buf;

buf = list_entry(icf->vb_vidq.stream.next, struct omap1_cam_buf,
buf = list_entry(icd->vb_vidq.stream.next, struct omap1_cam_buf,
vb.stream);

poll_wait(file, &buf->vb.done, pt);
Expand Down
4 changes: 1 addition & 3 deletions drivers/media/video/ov6650.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static int ov6650_g_fmt(struct v4l2_subdev *sd,

static bool is_unscaled_ok(int width, int height, struct v4l2_rect *rect)
{
return (width > rect->width >> 1 || height > rect->height >> 1);
return width > rect->width >> 1 || height > rect->height >> 1;
}

static u8 to_clkrc(struct v4l2_fract *timeperframe,
Expand Down Expand Up @@ -840,8 +840,6 @@ static int ov6650_s_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *mf)
coma_mask |= COMA_BW | COMA_BYTE_SWAP | COMA_WORD_SWAP;
coma_set |= COMA_RAW_RGB | COMA_RGB;
break;
case 0:
break;
default:
dev_err(&client->dev, "Pixel format not handled: 0x%x\n", code);
return -EINVAL;
Expand Down
24 changes: 12 additions & 12 deletions drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -6660,6 +6660,18 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x13c2,
.subdevice = 0x2804,
.driver_data = SAA7134_BOARD_TECHNOTREND_BUDGET_T3000,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5ace, /* Beholder Intl. Ltd. */
.subdevice = 0x7190,
.driver_data = SAA7134_BOARD_BEHOLD_H7,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5ace, /* Beholder Intl. Ltd. */
.subdevice = 0x7090,
.driver_data = SAA7134_BOARD_BEHOLD_A7,
}, {
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
Expand Down Expand Up @@ -6698,18 +6710,6 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.driver_data = SAA7134_BOARD_UNKNOWN,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5ace, /* Beholder Intl. Ltd. */
.subdevice = 0x7190,
.driver_data = SAA7134_BOARD_BEHOLD_H7,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x5ace, /* Beholder Intl. Ltd. */
.subdevice = 0x7090,
.driver_data = SAA7134_BOARD_BEHOLD_A7,
},{
/* --- end of list --- */
}
Expand Down
7 changes: 3 additions & 4 deletions drivers/media/video/se401.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ static const char version[] = "0.24";
#include <linux/init.h>
#include <linux/vmalloc.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/pagemap.h>
#include <linux/usb.h>
#include "se401.h"
Expand Down Expand Up @@ -951,9 +950,9 @@ static int se401_open(struct file *file)
struct usb_se401 *se401 = (struct usb_se401 *)dev;
int err = 0;

lock_kernel();
mutex_lock(&se401->lock);
if (se401->user) {
unlock_kernel();
mutex_unlock(&se401->lock);
return -EBUSY;
}
se401->fbuf = rvmalloc(se401->maxframesize * SE401_NUMFRAMES);
Expand All @@ -962,7 +961,7 @@ static int se401_open(struct file *file)
else
err = -ENOMEM;
se401->user = !err;
unlock_kernel();
mutex_unlock(&se401->lock);

return err;
}
Expand Down
4 changes: 0 additions & 4 deletions drivers/media/video/stk-webcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>

#include <linux/usb.h>
#include <linux/mm.h>
Expand Down Expand Up @@ -673,14 +672,11 @@ static int v4l_stk_open(struct file *fp)
vdev = video_devdata(fp);
dev = vdev_to_camera(vdev);

lock_kernel();
if (dev == NULL || !is_present(dev)) {
unlock_kernel();
return -ENXIO;
}
fp->private_data = dev;
usb_autopm_get_interface(dev->interface);
unlock_kernel();

return 0;
}
Expand Down
13 changes: 4 additions & 9 deletions drivers/media/video/tlg2300/pd-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <linux/string.h>
#include <linux/types.h>
#include <linux/firmware.h>
#include <linux/smp_lock.h>

#include "vendorcmds.h"
#include "pd-common.h"
Expand Down Expand Up @@ -485,15 +484,11 @@ static void poseidon_disconnect(struct usb_interface *interface)
/*unregister v4l2 device */
v4l2_device_unregister(&pd->v4l2_dev);

lock_kernel();
{
pd_dvb_usb_device_exit(pd);
poseidon_fm_exit(pd);
pd_dvb_usb_device_exit(pd);
poseidon_fm_exit(pd);

poseidon_audio_free(pd);
pd_video_exit(pd);
}
unlock_kernel();
poseidon_audio_free(pd);
pd_video_exit(pd);

usb_set_intfdata(interface, NULL);
kref_put(&pd->kref, poseidon_delete);
Expand Down
Loading

0 comments on commit c22cff0

Please sign in to comment.