blob: 2abb3321614d027ef0342ef8de0e6cb81bff7cb8 [file] [log] [blame]
Przemyslaw Czarnowskiff25d7e2020-03-26 11:39:37 +01001#ifndef _CONTAINER_OF_H
2#define _CONTAINER_OF_H
3
4#ifndef container_of
5#define container_of(ptr, type, member) \
Andrew Jeffery85966c12022-09-30 14:16:08 +09306 (type *)((char *)(ptr) - (char *)&((type *)0)->member)
Przemyslaw Czarnowskiff25d7e2020-03-26 11:39:37 +01007#endif
8
9#endif