blob: 4c6ce1bdb26d973bb6e3212fa8b696a0c9d9b90c [file] [log] [blame]
Patrick Williams691668f2023-11-01 08:19:10 -05001/* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
Rashmica Guptac1b66f42022-12-09 16:24:45 +11002#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