summaryrefslogtreecommitdiffstats
path: root/include/dect/utils.h
blob: 06ea59179211264b2b3d985df0dcce36b3742ab4 (plain)
1
2
3
4
5
6
7
8
#ifndef _LIBDECT_DECT_UTILS_H
#define _LIBDECT_DECT_UTILS_H

#define container_of(ptr, type, member) ({				\
	const typeof( ((type *)0)->member ) *__mptr = (ptr);		\
	(type *)( (char *)__mptr - offsetof(type,member) );})

#endif /* _LIBDECT_DECT_UTILS_H */