summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/stk-webcam.c
diff options
context:
space:
mode:
authorDavid Ellingsworth <david@identd.dyndns.org>2008-10-13 17:54:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-17 17:14:57 -0300
commit081d868faeb7acdd655c28607f84e797240bd035 (patch)
tree35e0bcd9c8dbb1875f8d20abc957fcb66fda13ea /drivers/media/video/stk-webcam.c
parent962d699e5d12952c43d7316bc72a527a8aa134b7 (diff)
V4L/DVB (9193): stk-webcam: minor cleanup
This patch: 1) removes the unnecessary kref.h include file 2) removes unnecessary pointer validation from read and poll routines. (Neither poll nor read may be called unless a call to open succeeds. A successful call to open will always set the file private_data pointer. Verifying that it is not null is therefore unnecessary. The associated release and mmap calls currently ignore this check.) 3) adds a space to syslog output. 4) removes an unused function prototype. Signed-off-by: David Ellingsworth <david@identd.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/stk-webcam.c')
-rw-r--r--drivers/media/video/stk-webcam.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index db69bc5556d..f1d5b3eaa19 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -27,7 +27,6 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
-#include <linux/kref.h>
#include <linux/usb.h>
#include <linux/mm.h>
@@ -714,9 +713,6 @@ static ssize_t v4l_stk_read(struct file *fp, char __user *buf,
struct stk_sio_buffer *sbuf;
struct stk_camera *dev = fp->private_data;
- if (dev == NULL)
- return -EIO;
-
if (!is_present(dev))
return -EIO;
if (dev->owner && dev->owner != fp)
@@ -773,9 +769,6 @@ static unsigned int v4l_stk_poll(struct file *fp, poll_table *wait)
{
struct stk_camera *dev = fp->private_data;
- if (dev == NULL)
- return -ENODEV;
-
poll_wait(fp, &dev->wait_frame, wait);
if (!is_present(dev))
@@ -1436,7 +1429,7 @@ static void stk_camera_disconnect(struct usb_interface *interface)
wake_up_interruptible(&dev->wait_frame);
stk_remove_sysfs_files(&dev->vdev);
- STK_INFO("Syntek USB2.0 Camera release resources"
+ STK_INFO("Syntek USB2.0 Camera release resources "
"video device /dev/video%d\n", dev->vdev.minor);
video_unregister_device(&dev->vdev);