summaryrefslogtreecommitdiff
path: root/fs/cramfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cramfs')
-rw-r--r--fs/cramfs/Makefile7
-rw-r--r--fs/cramfs/cramfs.c5
-rw-r--r--fs/cramfs/uncompress.c4
3 files changed, 4 insertions, 12 deletions
diff --git a/fs/cramfs/Makefile b/fs/cramfs/Makefile
index 13c043f..7b6cc0a 100644
--- a/fs/cramfs/Makefile
+++ b/fs/cramfs/Makefile
@@ -26,10 +26,11 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libcramfs.a
AOBJS =
-COBJS = cramfs.o uncompress.o
+COBJS-$(CONFIG_CMD_CRAMFS) := cramfs.o
+COBJS-$(CONFIG_CMD_CRAMFS) += uncompress.o
-SRCS := $(AOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS))
+SRCS := $(AOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(AOBJS) $(COBJS-y))
#CPPFLAGS +=
diff --git a/fs/cramfs/cramfs.c b/fs/cramfs/cramfs.c
index e53c783..2956d39 100644
--- a/fs/cramfs/cramfs.c
+++ b/fs/cramfs/cramfs.c
@@ -26,9 +26,6 @@
#include <common.h>
#include <malloc.h>
-
-#if defined(CONFIG_CMD_CRAMFS)
-
#include <asm/byteorder.h>
#include <linux/stat.h>
#include <jffs2/jffs2.h>
@@ -343,5 +340,3 @@ int cramfs_check (struct part_info *info)
}
return 1;
}
-
-#endif /* CFG_FS_CRAMFS */
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c
index cf67967..39dd275 100644
--- a/fs/cramfs/uncompress.c
+++ b/fs/cramfs/uncompress.c
@@ -25,8 +25,6 @@
#include <watchdog.h>
#include <zlib.h>
-#if defined(CONFIG_CMD_CRAMFS)
-
static z_stream stream;
void *zalloc(void *, unsigned, unsigned);
@@ -86,5 +84,3 @@ int cramfs_uncompress_exit (void)
inflateEnd (&stream);
return 0;
}
-
-#endif /* CFG_FS_CRAMFS */