[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap / media / 0005-v4l-subdev-Uninline-the-v4l2_subdev_init-function.patch
1 From 7acd77b0cdf013213a6513a75ee5bc2c3e92e1a1 Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Wed, 9 Dec 2009 12:38:52 +0100
4 Subject: [PATCH 05/43] v4l: subdev: Uninline the v4l2_subdev_init function
6 The function isn't small or performance sensitive enough to be inlined.
8 Signed-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(-)
14 diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c
15 index 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 */
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);
74 diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
75 index 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 }
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);
99 /* Call an ops of a v4l2_subdev, doing the right checks against
100 NULL pointers.
101 --
102 1.6.6.1