diff options
author | Justin Waters <justin.waters@timesys.com> | 2009-06-17 10:09:00 -0400 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-06-17 10:09:00 -0400 |
commit | 4e35d9f7af6cb5d553511d6064f224885fd905f4 (patch) | |
tree | 7ae0aec6dffc515af7c84c1d25f9c4ec6d0bc9f6 /include/common.h | |
parent | 180a90abdae72587c0f679edf8991455e559440d (diff) |
Add omapl137 support1.3.3-omapl137-evm-200906171409
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index d0f57040ee4..bfd18fe8961 100644 --- a/include/common.h +++ b/include/common.h @@ -106,6 +106,9 @@ typedef volatile unsigned char vu_char; #ifdef CONFIG_BLACKFIN #include <asm/blackfin.h> #endif +#ifdef CONFIG_DA8XX +#include <asm/arch/hardware.h> +#endif #include <part.h> #include <flash.h> @@ -176,6 +179,17 @@ typedef void (interrupt_handler_t)(void *); (__x > __y) ? __x : __y; }) +/** + * 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) );}) + /* * Function Prototypes */ |