Skip to content

Commit

Permalink
Decompressors: include <linux/slab.h> in <linux/decompress/mm.h>
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Larhzu authored and torvalds committed Jan 13, 2011
1 parent 93685ad commit 2b6b5ca
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions include/linux/decompress/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/decompress_bunzip2.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#define PREBOOT
#else
#include <linux/decompress/bunzip2.h>
#include <linux/slab.h>
#endif /* STATIC */

#include <linux/decompress/mm.h>
Expand Down
1 change: 0 additions & 1 deletion lib/decompress_inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "zlib_inflate/inflate.h"

#include "zlib_inflate/infutil.h"
#include <linux/slab.h>

#endif /* STATIC */

Expand Down
1 change: 0 additions & 1 deletion lib/decompress_unlzma.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#define PREBOOT
#else
#include <linux/decompress/unlzma.h>
#include <linux/slab.h>
#endif /* STATIC */

#include <linux/decompress/mm.h>
Expand Down
1 change: 0 additions & 1 deletion lib/decompress_unlzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#ifdef STATIC
#include "lzo/lzo1x_decompress.c"
#else
#include <linux/slab.h>
#include <linux/decompress/unlzo.h>
#endif

Expand Down

0 comments on commit 2b6b5ca

Please sign in to comment.