Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8efc1a1a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'bkl_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] uvcvideo: Convert to unlocked_ioctl
  [media] uvcvideo: Lock stream mutex when accessing format-related information
  [media] uvcvideo: Move mmap() handler to uvc_queue.c
  [media] uvcvideo: Move mutex lock/unlock inside uvc_free_buffers
  [media] uvcvideo: Lock controls mutex when querying menus
  [media] v4l2-dev: fix race condition
  [media] V4L: improve the BKL replacement heuristic
  [media] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock
  [media] cx18: convert to unlocked_ioctl
  [media] radio-timb: convert to unlocked_ioctl
  [media] sh_vou: convert to unlocked_ioctl
  [media] cafe_ccic: replace ioctl by unlocked_ioctl
  [media] et61x251_core: trivial conversion to unlocked_ioctl
  [media] sn9c102: convert to unlocked_ioctl
  [media] BKL: trivial ioctl -> unlocked_ioctl video driver conversions
  [media] typhoon: convert to unlocked_ioctl
  [media] si4713: convert to unlocked_ioctl
  [media] tea5764: convert to unlocked_ioctl
  [media] cadet: use unlocked_ioctl
  [media] BKL: trivial BKL removal from V4L2 radio drivers
parents 74280817 673eb9ff
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ static int vidioc_s_audio(struct file *file, void *priv,

static const struct v4l2_file_operations rtrack_fops = {
	.owner		= THIS_MODULE,
	.ioctl		= video_ioctl2,
	.unlocked_ioctl	= video_ioctl2,
};

static const struct v4l2_ioctl_ops rtrack_ioctl_ops = {
@@ -412,13 +412,6 @@ static int __init rtrack_init(void)
	rt->vdev.release = video_device_release_empty;
	video_set_drvdata(&rt->vdev, rt);

	if (video_register_device(&rt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
		v4l2_device_unregister(&rt->v4l2_dev);
		release_region(rt->io, 2);
		return -EINVAL;
	}
	v4l2_info(v4l2_dev, "AIMSlab RadioTrack/RadioReveal card driver.\n");

	/* Set up the I/O locking */

	mutex_init(&rt->lock);
@@ -430,6 +423,13 @@ static int __init rtrack_init(void)
	sleep_delay(2000000);	/* make sure it's totally down	*/
	outb(0xc0, rt->io);		/* steady volume, mute card	*/

	if (video_register_device(&rt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
		v4l2_device_unregister(&rt->v4l2_dev);
		release_region(rt->io, 2);
		return -EINVAL;
	}
	v4l2_info(v4l2_dev, "AIMSlab RadioTrack/RadioReveal card driver.\n");

	return 0;
}

+3 −3
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv,

static const struct v4l2_file_operations aztech_fops = {
	.owner		= THIS_MODULE,
	.ioctl		= video_ioctl2,
	.unlocked_ioctl	= video_ioctl2,
};

static const struct v4l2_ioctl_ops aztech_ioctl_ops = {
@@ -375,6 +375,8 @@ static int __init aztech_init(void)
	az->vdev.ioctl_ops = &aztech_ioctl_ops;
	az->vdev.release = video_device_release_empty;
	video_set_drvdata(&az->vdev, az);
	/* mute card - prevents noisy bootups */
	outb(0, az->io);

	if (video_register_device(&az->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
		v4l2_device_unregister(v4l2_dev);
@@ -383,8 +385,6 @@ static int __init aztech_init(void)
	}

	v4l2_info(v4l2_dev, "Aztech radio card driver v1.00/19990224 rkroll@exploits.org\n");
	/* mute card - prevents noisy bootups */
	outb(0, az->io);
	return 0;
}

+9 −3
Original line number Diff line number Diff line
@@ -328,11 +328,10 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
	unsigned char readbuf[RDS_BUFFER];
	int i = 0;

	if (dev->rdsstat == 0) {
	mutex_lock(&dev->lock);
	if (dev->rdsstat == 0) {
		dev->rdsstat = 1;
		outb(0x80, dev->io);        /* Select RDS fifo */
		mutex_unlock(&dev->lock);
		init_timer(&dev->readtimer);
		dev->readtimer.function = cadet_handler;
		dev->readtimer.data = (unsigned long)dev;
@@ -340,12 +339,15 @@ static ssize_t cadet_read(struct file *file, char __user *data, size_t count, lo
		add_timer(&dev->readtimer);
	}
	if (dev->rdsin == dev->rdsout) {
		mutex_unlock(&dev->lock);
		if (file->f_flags & O_NONBLOCK)
			return -EWOULDBLOCK;
		interruptible_sleep_on(&dev->read_queue);
		mutex_lock(&dev->lock);
	}
	while (i < count && dev->rdsin != dev->rdsout)
		readbuf[i++] = dev->rdsbuf[dev->rdsout++];
	mutex_unlock(&dev->lock);

	if (copy_to_user(data, readbuf, i))
		return -EFAULT;
@@ -525,9 +527,11 @@ static int cadet_open(struct file *file)
{
	struct cadet *dev = video_drvdata(file);

	mutex_lock(&dev->lock);
	dev->users++;
	if (1 == dev->users)
		init_waitqueue_head(&dev->read_queue);
	mutex_unlock(&dev->lock);
	return 0;
}

@@ -535,11 +539,13 @@ static int cadet_release(struct file *file)
{
	struct cadet *dev = video_drvdata(file);

	mutex_lock(&dev->lock);
	dev->users--;
	if (0 == dev->users) {
		del_timer_sync(&dev->readtimer);
		dev->rdsstat = 0;
	}
	mutex_unlock(&dev->lock);
	return 0;
}

@@ -559,7 +565,7 @@ static const struct v4l2_file_operations cadet_fops = {
	.open		= cadet_open,
	.release       	= cadet_release,
	.read		= cadet_read,
	.ioctl		= video_ioctl2,
	.unlocked_ioctl	= video_ioctl2,
	.poll		= cadet_poll,
};

+3 −3
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@ MODULE_DEVICE_TABLE(pci, gemtek_pci_id);

static const struct v4l2_file_operations gemtek_pci_fops = {
	.owner		= THIS_MODULE,
	.ioctl		= video_ioctl2,
	.unlocked_ioctl	= video_ioctl2,
};

static const struct v4l2_ioctl_ops gemtek_pci_ioctl_ops = {
@@ -422,11 +422,11 @@ static int __devinit gemtek_pci_probe(struct pci_dev *pdev, const struct pci_dev
	card->vdev.release = video_device_release_empty;
	video_set_drvdata(&card->vdev, card);

	gemtek_pci_mute(card);

	if (video_register_device(&card->vdev, VFL_TYPE_RADIO, nr_radio) < 0)
		goto err_video;

	gemtek_pci_mute(card);

	v4l2_info(v4l2_dev, "Gemtek PCI Radio (rev. %d) found at 0x%04x-0x%04x.\n",
		pdev->revision, card->iobase, card->iobase + card->length - 1);

+7 −7
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ static int gemtek_probe(struct gemtek *gt)

static const struct v4l2_file_operations gemtek_fops = {
	.owner		= THIS_MODULE,
	.ioctl		= video_ioctl2,
	.unlocked_ioctl	= video_ioctl2,
};

static int vidioc_querycap(struct file *file, void *priv,
@@ -577,12 +577,6 @@ static int __init gemtek_init(void)
	gt->vdev.release = video_device_release_empty;
	video_set_drvdata(&gt->vdev, gt);

	if (video_register_device(&gt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
		v4l2_device_unregister(v4l2_dev);
		release_region(gt->io, 1);
		return -EBUSY;
	}

	/* Set defaults */
	gt->lastfreq = GEMTEK_LOWFREQ;
	gt->bu2614data = 0;
@@ -590,6 +584,12 @@ static int __init gemtek_init(void)
	if (initmute)
		gemtek_mute(gt);

	if (video_register_device(&gt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
		v4l2_device_unregister(v4l2_dev);
		release_region(gt->io, 1);
		return -EBUSY;
	}

	return 0;
}

Loading