2 * V4L2 subdevice support.
4 * Copyright (C) 2010 Nokia Corporation
6 * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <linux/types.h>
23 #include <linux/ioctl.h>
24 #include <linux/videodev2.h>
26 #include <media/v4l2-device.h>
27 #include <media/v4l2-ioctl.h>
29 static int subdev_open(struct file *file)
34 static int subdev_close(struct file *file)
39 static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg)
49 static long subdev_ioctl(struct file *file, unsigned int cmd,
52 return video_usercopy(file, cmd, arg, subdev_do_ioctl);
55 const struct v4l2_file_operations v4l2_subdev_fops = {
58 .unlocked_ioctl = subdev_ioctl,
59 .release = subdev_close,