Patrick Williams | 691668f | 2023-11-01 08:19:10 -0500 | [diff] [blame] | 1 | /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */ |
Rashmica Gupta | c1b66f4 | 2022-12-09 16:24:45 +1100 | [diff] [blame] | 2 | #ifndef CONTAINER_OF_H |
3 | #define CONTAINER_OF_H | ||||
4 | |||||
5 | #ifndef container_of | ||||
6 | #define container_of(ptr, type, member) \ | ||||
7 | (type *)((char *)(ptr)-offsetof(type, member)) | ||||
8 | #endif | ||||
9 | |||||
10 | #endif |