Skip to content

Commit ae3bcb9

Browse files
Sakari Ailusrkhuangtao
authored andcommitted
FROMLIST: v4l: async: Use more intuitive names for internal functions
Rename internal functions to make the names of the functions better describe what they do. Old name New name v4l2_async_test_notify v4l2_async_match_notify v4l2_async_belongs v4l2_async_find_match Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (cherry picked from commit 5a471379502e339fcf882a01e2f95c82f301bff1) https://git.linuxtv.org/sailus/media_tree.git/log/?h=010f7f4393fd http://www.spinics.net/lists/linux-media/msg122688.html Signed-off-by: Marc Herbert <marc.herbert@intel.com> BUG=b:64133998 TEST=media device topology shows subdevs registered successfully TEST=no camera regression Change-Id: I24fe0deb3152438e8b65d70addcdcddee90251ed Reviewed-on: https://chromium-review.googlesource.com/693687 Commit-Ready: Tomasz Figa <tfiga@chromium.org> Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com> Reviewed-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
1 parent f22da32 commit ae3bcb9

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

drivers/media/v4l2-core/v4l2-async.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ static LIST_HEAD(subdev_list);
6464
static LIST_HEAD(notifier_list);
6565
static DEFINE_MUTEX(list_lock);
6666

67-
static struct v4l2_async_subdev *v4l2_async_belongs(struct v4l2_async_notifier *notifier,
68-
struct v4l2_subdev *sd)
67+
static struct v4l2_async_subdev *v4l2_async_find_match(
68+
struct v4l2_async_notifier *notifier, struct v4l2_subdev *sd)
6969
{
7070
bool (*match)(struct v4l2_subdev *, struct v4l2_async_subdev *);
7171
struct v4l2_async_subdev *asd;
@@ -99,9 +99,9 @@ static struct v4l2_async_subdev *v4l2_async_belongs(struct v4l2_async_notifier *
9999
return NULL;
100100
}
101101

102-
static int v4l2_async_test_notify(struct v4l2_async_notifier *notifier,
103-
struct v4l2_subdev *sd,
104-
struct v4l2_async_subdev *asd)
102+
static int v4l2_async_match_notify(struct v4l2_async_notifier *notifier,
103+
struct v4l2_subdev *sd,
104+
struct v4l2_async_subdev *asd)
105105
{
106106
int ret;
107107

@@ -179,11 +179,11 @@ int v4l2_async_notifier_register(struct v4l2_device *v4l2_dev,
179179
list_for_each_entry_safe(sd, tmp, &subdev_list, async_list) {
180180
int ret;
181181

182-
asd = v4l2_async_belongs(notifier, sd);
182+
asd = v4l2_async_find_match(notifier, sd);
183183
if (!asd)
184184
continue;
185185

186-
ret = v4l2_async_test_notify(notifier, sd, asd);
186+
ret = v4l2_async_match_notify(notifier, sd, asd);
187187
if (ret < 0) {
188188
mutex_unlock(&list_lock);
189189
return ret;
@@ -242,9 +242,10 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
242242
INIT_LIST_HEAD(&sd->async_list);
243243

244244
list_for_each_entry(notifier, &notifier_list, list) {
245-
struct v4l2_async_subdev *asd = v4l2_async_belongs(notifier, sd);
245+
struct v4l2_async_subdev *asd = v4l2_async_find_match(notifier,
246+
sd);
246247
if (asd) {
247-
int ret = v4l2_async_test_notify(notifier, sd, asd);
248+
int ret = v4l2_async_match_notify(notifier, sd, asd);
248249
mutex_unlock(&list_lock);
249250
return ret;
250251
}

0 commit comments

Comments
 (0)