[PATCH mmc-utils 5/6] mmc-utils: move offsetof from mmc.h to only user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



offsetof isn't mmc specific, so remove it from mmc.h. As there is only a single user
define it there.
---
 mmc.h      | 4 ----
 mmc_cmds.c | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/mmc.h b/mmc.h
index d01a55f18805..285c1f1c9423 100644
--- a/mmc.h
+++ b/mmc.h
@@ -19,10 +19,6 @@
 
 #include <linux/mmc/ioctl.h>
 
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
 /* From kernel linux/major.h */
 #define MMC_BLOCK_MAJOR			179
 
diff --git a/mmc_cmds.c b/mmc_cmds.c
index f1c70fb5fe55..cec947da1d4a 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -38,6 +38,10 @@
 #include "mmc_cmds.h"
 #include "3rdparty/hmac_sha/hmac_sha2.h"
 
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
 #define WP_BLKS_PER_QUERY 32
 
 #define USER_WP_PERM_PSWD_DIS	0x80
-- 
2.15.1

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux