projects/linux·commit 2b6b5caa

Decompressors: include <linux/slab.h> in <linux/decompress/mm.h>

2b6b5caa · Lasse Collin <[email protected]> · 2011-01-12 17:01:15 -08:00

Currently users of mm.h need to include <linux/slab.h> to use the macros
malloc() and free() provided by mm.h.  This fixes it.

Signed-off-by: Lasse Collin <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alain Knaff <[email protected]>
Cc: Albin Tonnerre <[email protected]>
Cc: Phillip Lougher <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
2b6b5caa6d05579bd1501006e34feec1b2aef8c4
Parents
93685ad2

Changes

5 files changed · +1 −4

include/linux/decompress/mm.h

View file
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
index a31e982..4cb72b9 100644
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -70,6 +70,7 @@ static void free(void *where)
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/string.h>
+#include <linux/slab.h>
#include <linux/vmalloc.h>
/* Use defines rather than static inline in order to avoid spurious

lib/decompress_bunzip2.c

View file
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index e805087..a7b80c1 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -49,7 +49,6 @@
#define PREBOOT
#else
#include <linux/decompress/bunzip2.h>
-#include <linux/slab.h>
#endif /* STATIC */
#include <linux/decompress/mm.h>

lib/decompress_inflate.c

View file
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index 9a7f5df..b5fe1d1 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -19,7 +19,6 @@
#include "zlib_inflate/inflate.h"
#include "zlib_inflate/infutil.h"
-#include <linux/slab.h>
#endif /* STATIC */

lib/decompress_unlzma.c

View file
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c
index 2787dc5..946b83b 100644
--- a/lib/decompress_unlzma.c
+++ b/lib/decompress_unlzma.c
@@ -33,7 +33,6 @@
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
-#include <linux/slab.h>
#endif /* STATIC */
#include <linux/decompress/mm.h>

lib/decompress_unlzo.c

View file
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index df3e98f..6e56d54 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -33,7 +33,6 @@
#ifdef STATIC
#include "lzo/lzo1x_decompress.c"
#else
-#include <linux/slab.h>
#include <linux/decompress/unlzo.h>
#endif