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

Commit 081d868f authored by David Ellingsworth's avatar David Ellingsworth Committed by Mauro Carvalho Chehab
Browse files

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: default avatarDavid Ellingsworth <david@identd.dyndns.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 962d699e
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -27,7 +27,6 @@
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/kref.h>


#include <linux/usb.h>
#include <linux/usb.h>
#include <linux/mm.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_sio_buffer *sbuf;
	struct stk_camera *dev = fp->private_data;
	struct stk_camera *dev = fp->private_data;


	if (dev == NULL)
		return -EIO;

	if (!is_present(dev))
	if (!is_present(dev))
		return -EIO;
		return -EIO;
	if (dev->owner && dev->owner != fp)
	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;
	struct stk_camera *dev = fp->private_data;


	if (dev == NULL)
		return -ENODEV;

	poll_wait(fp, &dev->wait_frame, wait);
	poll_wait(fp, &dev->wait_frame, wait);


	if (!is_present(dev))
	if (!is_present(dev))
+0 −1
Original line number Original line Diff line number Diff line
@@ -122,7 +122,6 @@ struct stk_camera {


#define vdev_to_camera(d) container_of(d, struct stk_camera, vdev)
#define vdev_to_camera(d) container_of(d, struct stk_camera, vdev)


void stk_camera_delete(struct kref *);
int stk_camera_write_reg(struct stk_camera *, u16, u8);
int stk_camera_write_reg(struct stk_camera *, u16, u8);
int stk_camera_read_reg(struct stk_camera *, u16, int *);
int stk_camera_read_reg(struct stk_camera *, u16, int *);