summaryrefslogtreecommitdiffstats
path: root/src/include/spi_flash.h
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2015-01-05 11:09:11 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-01-14 21:23:29 +0100
commit4417deb76fffa9b30746000983e148643ba3d17c (patch)
treeebf7dd0be05598827510f88ae2a0ef05da461298 /src/include/spi_flash.h
parent41759274fe9388137ce16f5199c42e14ddd48f13 (diff)
downloadcoreboot-4417deb76fffa9b30746000983e148643ba3d17c.tar.gz
coreboot-4417deb76fffa9b30746000983e148643ba3d17c.tar.bz2
coreboot-4417deb76fffa9b30746000983e148643ba3d17c.zip
Move container_of() macro to stddef.h
It's not a SPI related macro, hence move it to stddef.h where other similar macros live. Change-Id: I1008894af7a272f1bc36d3ae6cee3881132b6ba9 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/8109 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/include/spi_flash.h')
-rw-r--r--src/include/spi_flash.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index d697d8f8aeb1..8b8b0c54fe0d 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -28,17 +28,6 @@
#include <console/console.h>
#include <spi-generic.h>
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @param ptr: the pointer to the member.
- * @param type: the type of the container struct this is embedded in.
- * @param 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) );})
-
struct spi_flash {
struct spi_slave *spi;