diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/list.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/list.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/list.h b/drivers/gpu/nvgpu/include/nvgpu/list.h index e6efa254..a56971d0 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/list.h +++ b/drivers/gpu/nvgpu/include/nvgpu/list.h | |||
@@ -62,6 +62,15 @@ static inline void nvgpu_list_move(struct nvgpu_list_node *node, struct nvgpu_li | |||
62 | nvgpu_list_add(node, head); | 62 | nvgpu_list_add(node, head); |
63 | } | 63 | } |
64 | 64 | ||
65 | static inline void nvgpu_list_replace_init(struct nvgpu_list_node *old_node, struct nvgpu_list_node *new_node) | ||
66 | { | ||
67 | new_node->next = old_node->next; | ||
68 | new_node->next->prev = new_node; | ||
69 | new_node->prev = old_node->prev; | ||
70 | new_node->prev->next = new_node; | ||
71 | nvgpu_init_list_node(old_node); | ||
72 | } | ||
73 | |||
65 | #define nvgpu_list_entry(ptr, type, member) \ | 74 | #define nvgpu_list_entry(ptr, type, member) \ |
66 | type ## _from_ ## member(ptr) | 75 | type ## _from_ ## member(ptr) |
67 | 76 | ||