diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-19 20:08:37 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2021-11-20 17:04:53 +0100 |
commit | c87668554152d9160a77205995cafc44299beb93 (patch) | |
tree | 72bf7b146ae01d677fb37be278de8eba7956a977 | |
parent | 0f35ba34ecd7e820397f55cbc6d7201eb9530076 (diff) |
drivers/gpu/drm/radeon/: Don't redefine container_of()
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r-- | drivers/gpu/drm/radeon/mkregtable.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/mkregtable.c b/drivers/gpu/drm/radeon/mkregtable.c index a8d79f19a966..38a21b4cd670 100644 --- a/drivers/gpu/drm/radeon/mkregtable.c +++ b/drivers/gpu/drm/radeon/mkregtable.c @@ -10,6 +10,8 @@ * Dave Airlie */ + +#include <linux/container_of.h> #include <linux/offsetof.h> #include <sys/types.h> @@ -19,16 +21,6 @@ #include <regex.h> #include <libgen.h> -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#define container_of(ptr, type, member) ({ \ - const typeof(((type *)0)->member)*__mptr = (ptr); \ - (type *)((char *)__mptr - offsetof(type, member)); }) /* * Simple doubly linked list implementation. |