diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-09-15 13:49:07 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-20 23:05:57 -0400 |
commit | 7074f407198c79498795bb0fd04c2df36ab97a19 (patch) | |
tree | 38c60a96c8d8bf83e9cb50de74d553d5e1443711 /drivers/media/video/pwc/pwc-if.c | |
parent | 479567ce3af7b99d645a3c53b8ca2fc65e46efdc (diff) |
V4L/DVB: pwc: remove BKL
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-if.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index d06e157657ac..e62beb4efdb4 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -163,7 +163,7 @@ static const struct v4l2_file_operations pwc_fops = { | |||
163 | .read = pwc_video_read, | 163 | .read = pwc_video_read, |
164 | .poll = pwc_video_poll, | 164 | .poll = pwc_video_poll, |
165 | .mmap = pwc_video_mmap, | 165 | .mmap = pwc_video_mmap, |
166 | .ioctl = pwc_video_ioctl, | 166 | .unlocked_ioctl = pwc_video_ioctl, |
167 | }; | 167 | }; |
168 | static struct video_device pwc_template = { | 168 | static struct video_device pwc_template = { |
169 | .name = "Philips Webcam", /* Filled in later */ | 169 | .name = "Philips Webcam", /* Filled in later */ |
@@ -1247,8 +1247,8 @@ static int pwc_video_close(struct file *file) | |||
1247 | 1247 | ||
1248 | PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev); | 1248 | PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev); |
1249 | 1249 | ||
1250 | lock_kernel(); | ||
1251 | pdev = video_get_drvdata(vdev); | 1250 | pdev = video_get_drvdata(vdev); |
1251 | mutex_lock(&pdev->modlock); | ||
1252 | if (pdev->vopen == 0) | 1252 | if (pdev->vopen == 0) |
1253 | PWC_DEBUG_MODULE("video_close() called on closed device?\n"); | 1253 | PWC_DEBUG_MODULE("video_close() called on closed device?\n"); |
1254 | 1254 | ||
@@ -1286,7 +1286,7 @@ static int pwc_video_close(struct file *file) | |||
1286 | if (device_hint[hint].pdev == pdev) | 1286 | if (device_hint[hint].pdev == pdev) |
1287 | device_hint[hint].pdev = NULL; | 1287 | device_hint[hint].pdev = NULL; |
1288 | } | 1288 | } |
1289 | unlock_kernel(); | 1289 | mutex_unlock(&pdev->modlock); |
1290 | 1290 | ||
1291 | return 0; | 1291 | return 0; |
1292 | } | 1292 | } |
@@ -1872,8 +1872,8 @@ static void usb_pwc_disconnect(struct usb_interface *intf) | |||
1872 | struct pwc_device *pdev; | 1872 | struct pwc_device *pdev; |
1873 | int hint; | 1873 | int hint; |
1874 | 1874 | ||
1875 | lock_kernel(); | ||
1876 | pdev = usb_get_intfdata (intf); | 1875 | pdev = usb_get_intfdata (intf); |
1876 | mutex_lock(&pdev->modlock); | ||
1877 | usb_set_intfdata (intf, NULL); | 1877 | usb_set_intfdata (intf, NULL); |
1878 | if (pdev == NULL) { | 1878 | if (pdev == NULL) { |
1879 | PWC_ERROR("pwc_disconnect() Called without private pointer.\n"); | 1879 | PWC_ERROR("pwc_disconnect() Called without private pointer.\n"); |
@@ -1898,9 +1898,7 @@ static void usb_pwc_disconnect(struct usb_interface *intf) | |||
1898 | wake_up_interruptible(&pdev->frameq); | 1898 | wake_up_interruptible(&pdev->frameq); |
1899 | /* Wait until device is closed */ | 1899 | /* Wait until device is closed */ |
1900 | if (pdev->vopen) { | 1900 | if (pdev->vopen) { |
1901 | mutex_lock(&pdev->modlock); | ||
1902 | pdev->unplugged = 1; | 1901 | pdev->unplugged = 1; |
1903 | mutex_unlock(&pdev->modlock); | ||
1904 | pwc_iso_stop(pdev); | 1902 | pwc_iso_stop(pdev); |
1905 | } else { | 1903 | } else { |
1906 | /* Device is closed, so we can safely unregister it */ | 1904 | /* Device is closed, so we can safely unregister it */ |
@@ -1914,7 +1912,7 @@ disconnect_out: | |||
1914 | device_hint[hint].pdev = NULL; | 1912 | device_hint[hint].pdev = NULL; |
1915 | } | 1913 | } |
1916 | 1914 | ||
1917 | unlock_kernel(); | 1915 | mutex_unlock(&pdev->modlock); |
1918 | } | 1916 | } |
1919 | 1917 | ||
1920 | 1918 | ||