summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch b/extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch
new file mode 100644
index 00000000..a4e45e61
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap/media/0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch
@@ -0,0 +1,103 @@
1From 7acd77b0cdf013213a6513a75ee5bc2c3e92e1a1 Mon Sep 17 00:00:00 2001
2From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3Date: Wed, 9 Dec 2009 12:38:52 +0100
4Subject: [PATCH 05/43] v4l: subdev: Uninline the v4l2_subdev_init function
5
6The function isn't small or performance sensitive enough to be inlined.
7
8Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9---
10 drivers/media/video/v4l2-subdev.c | 42 +++++++++++++++++++++++++-----------
11 include/media/v4l2-subdev.h | 16 +------------
12 2 files changed, 31 insertions(+), 27 deletions(-)
13
14diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
15index 00bd4b1..0deff78 100644
16--- a/drivers/media/video/v4l2-subdev.c
17+++ b/drivers/media/video/v4l2-subdev.c
18@@ -1,22 +1,23 @@
19 /*
20- * V4L2 subdevice support.
21+ * V4L2 sub-device
22 *
23- * Copyright (C) 2010 Nokia Corporation
24+ * Copyright (C) 2010 Nokia Corporation
25 *
26- * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
27+ * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
28+ * Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
29 *
30- * This program is free software; you can redistribute it and/or modify
31- * it under the terms of the GNU General Public License as published by
32- * the Free Software Foundation.
33+ * This program is free software; you can redistribute it and/or modify
34+ * it under the terms of the GNU General Public License version 2 as
35+ * published by the Free Software Foundation.
36 *
37- * This program is distributed in the hope that it will be useful,
38- * but WITHOUT ANY WARRANTY; without even the implied warranty of
39- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40- * GNU General Public License for more details.
41+ * This program is distributed in the hope that it will be useful,
42+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
43+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44+ * GNU General Public License for more details.
45 *
46- * You should have received a copy of the GNU General Public License
47- * along with this program; if not, write to the Free Software
48- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
49+ * You should have received a copy of the GNU General Public License
50+ * along with this program; if not, write to the Free Software
51+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
52 */
53
54 #include <linux/types.h>
55@@ -64,3 +65,18 @@ const struct v4l2_file_operations v4l2_subdev_fops = {
56 .unlocked_ioctl = subdev_ioctl,
57 .release = subdev_close,
58 };
59+
60+void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops)
61+{
62+ INIT_LIST_HEAD(&sd->list);
63+ BUG_ON(!ops);
64+ sd->ops = ops;
65+ sd->v4l2_dev = NULL;
66+ sd->flags = 0;
67+ sd->name[0] = '\0';
68+ sd->grp_id = 0;
69+ sd->dev_priv = NULL;
70+ sd->host_priv = NULL;
71+ sd->initialized = 1;
72+}
73+EXPORT_SYMBOL(v4l2_subdev_init);
74diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
75index de181db..90022f5 100644
76--- a/include/media/v4l2-subdev.h
77+++ b/include/media/v4l2-subdev.h
78@@ -473,20 +473,8 @@ static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd)
79 return sd->host_priv;
80 }
81
82-static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
83- const struct v4l2_subdev_ops *ops)
84-{
85- INIT_LIST_HEAD(&sd->list);
86- BUG_ON(!ops);
87- sd->ops = ops;
88- sd->v4l2_dev = NULL;
89- sd->flags = 0;
90- sd->name[0] = '\0';
91- sd->grp_id = 0;
92- sd->dev_priv = NULL;
93- sd->host_priv = NULL;
94- sd->initialized = 1;
95-}
96+void v4l2_subdev_init(struct v4l2_subdev *sd,
97+ const struct v4l2_subdev_ops *ops);
98
99 /* Call an ops of a v4l2_subdev, doing the right checks against
100 NULL pointers.
101--
1021.6.6.1
103