qcacmn: Add qdf_list static initializer macros

In order to use qdf_list in situations where static initialization is
preferable, add a number of macros for statically initializing the
qdf_list structures.

Change-Id: I9a1291d495e7940b57d8519da0e3d62a0dfd2064
CRs-Fixed: 2222980
This commit is contained in:
Dustin Brown
2018-04-11 16:36:13 -07:00
committed by nshrivas
父節點 f667999f9a
當前提交 cb94e45a0e
共有 2 個文件被更改,包括 34 次插入5 次删除

查看文件

@@ -1,9 +1,8 @@
/*
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
@@ -25,7 +24,6 @@
* to the Linux Foundation.
*/
/**
* DOC: qdf_list.h
* QCA driver framework (QDF) list APIs
@@ -99,6 +97,18 @@ static inline void qdf_list_create(__qdf_list_t *list, uint32_t max_size)
__qdf_list_create(list, max_size);
}
#define QDF_LIST_ANCHOR(list) __QDF_LIST_ANCHOR(list)
#define QDF_LIST_NODE_INIT(prev, next) __QDF_LIST_NODE_INIT(prev, next)
#define QDF_LIST_NODE_INIT_SINGLE(node) __QDF_LIST_NODE_INIT_SINGLE(node)
#define QDF_LIST_INIT(tail, head) __QDF_LIST_INIT(tail, head)
#define QDF_LIST_INIT_SINGLE(node) __QDF_LIST_INIT_SINGLE(node)
#define QDF_LIST_INIT_EMPTY(list) __QDF_LIST_INIT_EMPTY(list)
#define qdf_list_for_each(list_ptr, cursor, node_field) \
__qdf_list_for_each(list_ptr, cursor, node_field)
/**
* qdf_init_list_head() - initialize list head
* @list_head: pointer to list head