From patchwork Tue Nov 16 21:56:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 329861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAGLv3lH005871 for ; Tue, 16 Nov 2010 21:57:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932809Ab0KPV4s (ORCPT ); Tue, 16 Nov 2010 16:56:48 -0500 Received: from smtp-vbr12.xs4all.nl ([194.109.24.32]:1897 "EHLO smtp-vbr12.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932723Ab0KPV4r (ORCPT ); Tue, 16 Nov 2010 16:56:47 -0500 Received: from localhost (209.80-203-30.nextgentel.com [80.203.30.209]) by smtp-vbr12.xs4all.nl (8.13.8/8.13.8) with ESMTP id oAGLujsa021184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 16 Nov 2010 22:56:45 +0100 (CET) (envelope-from hverkuil@xs4all.nl) Message-Id: <731d59e84965d0357a4124a98b137f4df5fac031.1289944160.git.hverkuil@xs4all.nl> In-Reply-To: References: From: Hans Verkuil Date: Tue, 16 Nov 2010 22:56:43 +0100 Subject: [RFCv2 PATCH 13/15] radio-timb: convert to unlocked_ioctl. To: linux-media@vger.kernel.org Cc: Arnd Bergmann X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 16 Nov 2010 21:57:08 +0000 (UTC) diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index b8bb3ef..a185610 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c @@ -34,6 +34,7 @@ struct timbradio { struct v4l2_subdev *sd_dsp; struct video_device video_dev; struct v4l2_device v4l2_dev; + struct mutex lock; }; @@ -142,7 +143,7 @@ static const struct v4l2_ioctl_ops timbradio_ioctl_ops = { static const struct v4l2_file_operations timbradio_fops = { .owner = THIS_MODULE, - .ioctl = video_ioctl2, + .unlocked_ioctl = video_ioctl2, }; static int __devinit timbradio_probe(struct platform_device *pdev) @@ -164,6 +165,7 @@ static int __devinit timbradio_probe(struct platform_device *pdev) } tr->pdata = *pdata; + mutex_init(&tr->lock); strlcpy(tr->video_dev.name, "Timberdale Radio", sizeof(tr->video_dev.name)); @@ -171,6 +173,7 @@ static int __devinit timbradio_probe(struct platform_device *pdev) tr->video_dev.ioctl_ops = &timbradio_ioctl_ops; tr->video_dev.release = video_device_release_empty; tr->video_dev.minor = -1; + tr->video_dev.lock = &tr->lock; strlcpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); err = v4l2_device_register(NULL, &tr->v4l2_dev);