[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200706022150.27746.dhazelton@enter.net>
Date: Sat, 2 Jun 2007 21:50:27 -0400
From: Daniel Hazelton <dhazelton@...er.net>
To: Prakash Punnoor <prakash@...noor.de>
Cc: dwmw2@...radead.org, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: [Trivial Patch] Remove JFFS2 dependency on internal Zlib header (take 2)
No code besides zlib itself should depend on linux/zutil.h - the only item
JFFS2 uses from that header is a constant that is defined in RFC 1950 and
should never change. This patch mirrors the #define in zutil.h and removes
the #include.
Signed-off-by: Daniel Hazelton <dhazelton@...er.net>
DRH
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
index 2b87fcc..f4519db 100644
--- a/fs/jffs2/compr_zlib.c
+++ b/fs/jffs2/compr_zlib.c
@@ -16,7 +16,6 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/zlib.h>
-#include <linux/zutil.h>
#include "nodelist.h"
#include "compr.h"
@@ -29,6 +28,13 @@
*/
#define STREAM_END_SPACE 12
+/*
+ * PRESET_DICT is set in the internal (aka: private) zlib header zutil.h
+ * the value - 0x20 - is defined in RFC 1950, so making a duplicate
+ * definition here to remove this code's dependency on that file is safe.
+ */
+#define PRESET_DICT 0x20
+
static DEFINE_MUTEX(deflate_mutex);
static DEFINE_MUTEX(inflate_mutex);
static z_stream inf_strm, def_strm;
View attachment "remove-jffs2-zutil.h-dependency.patch" of type "text/x-diff" (733 bytes)
Powered by blists - more mailing lists