All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Subject: [RFC PATCH 8/8] BKL: trivial ioctl -> unlocked_ioctl video driver conversions
Date: Sun, 14 Nov 2010 14:23:06 +0100	[thread overview]
Message-ID: <3af9cf3b01c9e86b9826b65495d0528f93752e2c.1289740431.git.hverkuil@xs4all.nl> (raw)
In-Reply-To: <cover.1289740431.git.hverkuil@xs4all.nl>

These drivers could be trivially converted to unlocked_ioctl since they
already did locking.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
---
 drivers/media/video/arv.c     |    2 +-
 drivers/media/video/bw-qcam.c |    2 +-
 drivers/media/video/c-qcam.c  |    2 +-
 drivers/media/video/meye.c    |   14 +++++++-------
 drivers/media/video/pms.c     |    2 +-
 drivers/media/video/w9966.c   |    2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c
index 31e7a12..f989f28 100644
--- a/drivers/media/video/arv.c
+++ b/drivers/media/video/arv.c
@@ -712,7 +712,7 @@ static int ar_initialize(struct ar *ar)
 static const struct v4l2_file_operations ar_fops = {
 	.owner		= THIS_MODULE,
 	.read		= ar_read,
-	.ioctl		= video_ioctl2,
+	.unlocked_ioctl	= video_ioctl2,
 };
 
 static const struct v4l2_ioctl_ops ar_ioctl_ops = {
diff --git a/drivers/media/video/bw-qcam.c b/drivers/media/video/bw-qcam.c
index 935e0c9..c119350 100644
--- a/drivers/media/video/bw-qcam.c
+++ b/drivers/media/video/bw-qcam.c
@@ -860,7 +860,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
 
 static const struct v4l2_file_operations qcam_fops = {
 	.owner		= THIS_MODULE,
-	.ioctl          = video_ioctl2,
+	.unlocked_ioctl = video_ioctl2,
 	.read		= qcam_read,
 };
 
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c
index 6e4b196..24fc009 100644
--- a/drivers/media/video/c-qcam.c
+++ b/drivers/media/video/c-qcam.c
@@ -718,7 +718,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
 
 static const struct v4l2_file_operations qcam_fops = {
 	.owner		= THIS_MODULE,
-	.ioctl		= video_ioctl2,
+	.unlocked_ioctl	= video_ioctl2,
 	.read		= qcam_read,
 };
 
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index 2be23bc..48d2c24 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -1659,7 +1659,7 @@ static const struct v4l2_file_operations meye_fops = {
 	.open		= meye_open,
 	.release	= meye_release,
 	.mmap		= meye_mmap,
-	.ioctl		= video_ioctl2,
+	.unlocked_ioctl	= video_ioctl2,
 	.poll		= meye_poll,
 };
 
@@ -1831,12 +1831,6 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
 	msleep(1);
 	mchip_set(MCHIP_MM_INTA, MCHIP_MM_INTA_HIC_1_MASK);
 
-	if (video_register_device(meye.vdev, VFL_TYPE_GRABBER,
-				  video_nr) < 0) {
-		v4l2_err(v4l2_dev, "video_register_device failed\n");
-		goto outvideoreg;
-	}
-
 	mutex_init(&meye.lock);
 	init_waitqueue_head(&meye.proc_list);
 	meye.brightness = 32 << 10;
@@ -1858,6 +1852,12 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
 	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
 	sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
 
+	if (video_register_device(meye.vdev, VFL_TYPE_GRABBER,
+				  video_nr) < 0) {
+		v4l2_err(v4l2_dev, "video_register_device failed\n");
+		goto outvideoreg;
+	}
+
 	v4l2_info(v4l2_dev, "Motion Eye Camera Driver v%s.\n",
 	       MEYE_DRIVER_VERSION);
 	v4l2_info(v4l2_dev, "mchip KL5A72002 rev. %d, base %lx, irq %d\n",
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c
index 7129b50..7551907 100644
--- a/drivers/media/video/pms.c
+++ b/drivers/media/video/pms.c
@@ -932,7 +932,7 @@ static ssize_t pms_read(struct file *file, char __user *buf,
 
 static const struct v4l2_file_operations pms_fops = {
 	.owner		= THIS_MODULE,
-	.ioctl		= video_ioctl2,
+	.unlocked_ioctl	= video_ioctl2,
 	.read           = pms_read,
 };
 
diff --git a/drivers/media/video/w9966.c b/drivers/media/video/w9966.c
index 635420d..019ee20 100644
--- a/drivers/media/video/w9966.c
+++ b/drivers/media/video/w9966.c
@@ -815,7 +815,7 @@ out:
 
 static const struct v4l2_file_operations w9966_fops = {
 	.owner		= THIS_MODULE,
-	.ioctl          = video_ioctl2,
+	.unlocked_ioctl = video_ioctl2,
 	.read           = w9966_v4l_read,
 };
 
-- 
1.7.0.4


  parent reply	other threads:[~2010-11-14 13:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14 13:21 [RFC PATCH 0/8] V4L BKL removal: first round Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 1/8] v4l2-dev: use mutex_lock_interruptible instead of plain mutex_lock Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 2/8] BKL: trivial BKL removal from V4L2 radio drivers Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 3/8] cadet: use unlocked_ioctl Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 4/8] tea5764: convert to unlocked_ioctl Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 5/8] si4713: " Hans Verkuil
2010-11-14 13:22 ` [RFC PATCH 6/8] typhoon: " Hans Verkuil
2010-11-14 13:23 ` [RFC PATCH 7/8] dsbr100: " Hans Verkuil
2010-11-14 13:23 ` Hans Verkuil [this message]
2010-11-14 21:53 ` [RFC PATCH 0/8] V4L BKL removal: first round Arnd Bergmann
2010-11-14 22:48   ` Hans Verkuil
2010-11-15  9:17     ` Arnd Bergmann
2010-11-15  9:49       ` Hans Verkuil
2010-11-16 12:19         ` Mauro Carvalho Chehab
2010-11-16 12:35           ` Hans Verkuil
2010-11-16 13:06             ` Mauro Carvalho Chehab
2010-11-16 13:20               ` Hans Verkuil
2010-11-16 14:22                 ` Arnd Bergmann
2010-11-16 14:50                   ` Hans Verkuil
2010-11-16 15:13                     ` Arnd Bergmann
2010-11-16 15:27                       ` Hans Verkuil
2010-11-16 15:30                         ` Hans Verkuil
2010-11-16 16:01                           ` Arnd Bergmann
2010-11-16 16:32                             ` Mauro Carvalho Chehab
2010-11-16 16:49                             ` Hans Verkuil
2010-11-16 18:38                               ` Hans Verkuil
2010-11-16 19:23                                 ` Arnd Bergmann
2010-11-16 19:59                                 ` Andy Walls
2010-11-16 20:29                                   ` Hans Verkuil
2010-11-16 21:10                                     ` Hans Verkuil
2010-11-16 21:32                                       ` David Ellingsworth
2010-11-16 21:42                                         ` Hans Verkuil
2010-11-17 15:36                                           ` David Ellingsworth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3af9cf3b01c9e86b9826b65495d0528f93752e2c.1289740431.git.hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=arnd@arndb.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.