struct v4l2_async_match_desc *match);
struct v4l2_async_subdev *asd;
- list_for_each_entry(asd, ¬ifier->waiting, list) {
+ list_for_each_entry(asd, ¬ifier->waiting_list, waiting_entry) {
/* bus_type has been verified valid before */
switch (asd->match.type) {
case V4L2_ASYNC_MATCH_TYPE_I2C:
{
struct v4l2_async_notifier *n;
- list_for_each_entry(n, ¬ifier_list, list)
+ list_for_each_entry(n, ¬ifier_list, notifier_entry)
if (n->sd == sd)
return n;
{
struct v4l2_subdev *sd;
- if (!list_empty(¬ifier->waiting))
+ if (!list_empty(¬ifier->waiting_list))
return false;
- list_for_each_entry(sd, ¬ifier->done, async_list) {
+ list_for_each_entry(sd, ¬ifier->done_list, async_list) {
struct v4l2_async_notifier *subdev_notifier =
v4l2_async_find_subdev_notifier(sd);
struct v4l2_async_notifier *__notifier = notifier;
/* Quick check whether there are still more sub-devices here. */
- if (!list_empty(¬ifier->waiting))
+ if (!list_empty(¬ifier->waiting_list))
return 0;
if (notifier->sd)
return ret;
}
- /* Remove from the waiting list */
- list_del(&asd->list);
+ list_del(&asd->waiting_entry);
sd->asd = asd;
sd->notifier = notifier;
/* Move from the global subdevice list to notifier's done */
- list_move(&sd->async_list, ¬ifier->done);
+ list_move(&sd->async_list, ¬ifier->done_list);
dev_dbg(notifier_dev(notifier), "v4l2-async: %s bound (ret %d)\n",
dev_name(sd->dev), ret);
{
struct v4l2_subdev *sd, *tmp;
- list_for_each_entry_safe(sd, tmp, ¬ifier->done, async_list) {
+ list_for_each_entry_safe(sd, tmp, ¬ifier->done_list, async_list) {
struct v4l2_async_notifier *subdev_notifier =
v4l2_async_find_subdev_notifier(sd);
v4l2_async_nf_call_unbind(notifier, sd, sd->asd);
if (readd)
- list_add_tail(&sd->asd->list, ¬ifier->waiting);
+ list_add_tail(&sd->asd->waiting_entry,
+ ¬ifier->waiting_list);
v4l2_async_cleanup(sd);
list_move(&sd->async_list, &subdev_list);
struct v4l2_async_subdev *asd;
struct v4l2_subdev *sd;
- list_for_each_entry(asd, ¬ifier->waiting, list)
+ list_for_each_entry(asd, ¬ifier->waiting_list, waiting_entry)
if (v4l2_async_match_equal(&asd->match, match))
return true;
- list_for_each_entry(sd, ¬ifier->done, async_list) {
+ list_for_each_entry(sd, ¬ifier->done_list, async_list) {
if (WARN_ON(!sd->asd))
continue;
lockdep_assert_held(&list_lock);
/* Check that an asd is not being added more than once. */
- list_for_each_entry(asd, ¬ifier->asd_list, asd_list) {
+ list_for_each_entry(asd, ¬ifier->asd_list, asd_entry) {
if (skip_self && &asd->match == match)
continue;
if (v4l2_async_match_equal(&asd->match, match))
}
/* Check that an asd does not exist in other notifiers. */
- list_for_each_entry(notifier, ¬ifier_list, list)
+ list_for_each_entry(notifier, ¬ifier_list, notifier_entry)
if (v4l2_async_nf_has_async_match_entry(notifier, match))
return true;
struct v4l2_async_subdev *asd;
int ret;
- INIT_LIST_HEAD(¬ifier->waiting);
- INIT_LIST_HEAD(¬ifier->done);
+ INIT_LIST_HEAD(¬ifier->waiting_list);
+ INIT_LIST_HEAD(¬ifier->done_list);
mutex_lock(&list_lock);
- list_for_each_entry(asd, ¬ifier->asd_list, asd_list) {
+ list_for_each_entry(asd, ¬ifier->asd_list, asd_entry) {
ret = v4l2_async_nf_match_valid(notifier, &asd->match, true);
if (ret)
goto err_unlock;
- list_add_tail(&asd->list, ¬ifier->waiting);
+ list_add_tail(&asd->waiting_entry, ¬ifier->waiting_list);
}
ret = v4l2_async_nf_try_all_subdevs(notifier);
goto err_unbind;
/* Keep also completed notifiers on the list */
- list_add(¬ifier->list, ¬ifier_list);
+ list_add(¬ifier->notifier_entry, ¬ifier_list);
mutex_unlock(&list_lock);
notifier->sd = NULL;
notifier->v4l2_dev = NULL;
- list_del(¬ifier->list);
+ list_del(¬ifier->notifier_entry);
}
void v4l2_async_nf_unregister(struct v4l2_async_notifier *notifier)
if (!notifier || !notifier->asd_list.next)
return;
- list_for_each_entry_safe(asd, tmp, ¬ifier->asd_list, asd_list) {
+ list_for_each_entry_safe(asd, tmp, ¬ifier->asd_list, asd_entry) {
switch (asd->match.type) {
case V4L2_ASYNC_MATCH_TYPE_FWNODE:
fwnode_handle_put(asd->match.fwnode);
break;
}
- list_del(&asd->asd_list);
+ list_del(&asd->asd_entry);
v4l2_async_nf_call_destroy(notifier, asd);
kfree(asd);
}
if (ret)
goto unlock;
- list_add_tail(&asd->asd_list, ¬ifier->asd_list);
+ list_add_tail(&asd->asd_entry, ¬ifier->asd_list);
unlock:
mutex_unlock(&list_lock);
INIT_LIST_HEAD(&sd->async_list);
- list_for_each_entry(notifier, ¬ifier_list, list) {
+ list_for_each_entry(notifier, ¬ifier_list, notifier_entry) {
struct v4l2_device *v4l2_dev =
v4l2_async_nf_find_v4l2_dev(notifier);
struct v4l2_async_subdev *asd;
if (sd->asd) {
struct v4l2_async_notifier *notifier = sd->notifier;
- list_add(&sd->asd->list, ¬ifier->waiting);
+ list_add(&sd->asd->waiting_entry, ¬ifier->waiting_list);
v4l2_async_nf_call_unbind(notifier, sd, sd->asd);
}
mutex_lock(&list_lock);
- list_for_each_entry(notif, ¬ifier_list, list) {
+ list_for_each_entry(notif, ¬ifier_list, notifier_entry) {
seq_printf(s, "%s:\n", v4l2_async_nf_name(notif));
- list_for_each_entry(asd, ¬if->waiting, list)
+ list_for_each_entry(asd, ¬if->waiting_list, waiting_entry)
print_waiting_match(s, &asd->match);
}
* struct v4l2_async_subdev - sub-device descriptor, as known to a bridge
*
* @match: struct of match type and per-bus type matching data sets
- * @asd_list: used to add struct v4l2_async_subdev objects to the
+ * @asd_entry: used to add struct v4l2_async_subdev objects to the
* master notifier @asd_list
- * @list: used to link struct v4l2_async_subdev objects, waiting to be
- * probed, to a notifier->waiting list
+ * @waiting_entry: used to link struct v4l2_async_subdev objects, waiting to be
+ * probed, to a notifier->waiting_list list
*
* When this struct is used as a member in a driver specific struct,
* the driver specific struct shall contain the &struct
*/
struct v4l2_async_subdev {
struct v4l2_async_match_desc match;
- struct list_head list;
- struct list_head asd_list;
+ struct list_head asd_entry;
+ struct list_head waiting_entry;
};
/**
* @sd: sub-device that registered the notifier, NULL otherwise
* @parent: parent notifier
* @asd_list: master list of struct v4l2_async_subdev
- * @waiting: list of struct v4l2_async_subdev, waiting for their drivers
- * @done: list of struct v4l2_subdev, already probed
- * @list: member in a global list of notifiers
+ * @waiting_list: list of struct v4l2_async_subdev, waiting for their drivers
+ * @done_list: list of struct v4l2_subdev, already probed
+ * @notifier_entry: member in a global list of notifiers
*/
struct v4l2_async_notifier {
const struct v4l2_async_notifier_operations *ops;
struct v4l2_subdev *sd;
struct v4l2_async_notifier *parent;
struct list_head asd_list;
- struct list_head waiting;
- struct list_head done;
- struct list_head list;
+ struct list_head waiting_list;
+ struct list_head done_list;
+ struct list_head notifier_entry;
};
/**