summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:56 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-31 04:24:56 +0200
commit08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878 (patch)
tree0b8d061f6fd4b7ad68b94e509e644e5456a44613 /fs/fat
parentc1de7a6daf9c657484e1c6d433f01fccd49a7f48 (diff)
downloadblackbird-obmc-uboot-08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878.tar.gz
blackbird-obmc-uboot-08ab4e1780fa63c88dd5a5ab52f4ff4ed1ee1878.zip
fs: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'fs/fat')
-rw-r--r--fs/fat/Makefile6
-rw-r--r--fs/fat/fat.c4
-rw-r--r--fs/fat/file.c4
3 files changed, 3 insertions, 11 deletions
diff --git a/fs/fat/Makefile b/fs/fat/Makefile
index 87af73b7eb..b711460f3a 100644
--- a/fs/fat/Makefile
+++ b/fs/fat/Makefile
@@ -24,10 +24,10 @@ include $(TOPDIR)/config.mk
LIB = $(obj)libfat.a
AOBJS =
-COBJS = fat.o file.o
+COBJS-$(CONFIG_CMD_FAT) := fat.o file.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))
all: $(LIB) $(AOBJS)
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 49c78ed79a..2f0bd8c14d 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -31,8 +31,6 @@
#include <asm/byteorder.h>
#include <part.h>
-#if defined(CONFIG_CMD_FAT)
-
/*
* Convert a string to lowercase.
*/
@@ -1024,5 +1022,3 @@ file_fat_read(const char *filename, void *buffer, unsigned long maxsize)
printf("reading %s\n",filename);
return do_fat_read(filename, buffer, maxsize, LS_NO);
}
-
-#endif
diff --git a/fs/fat/file.c b/fs/fat/file.c
index 514dbaecba..e870734402 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -32,8 +32,6 @@
#include <linux/stat.h>
#include <linux/time.h>
-#if defined(CONFIG_CMD_FAT)
-
/* Supported filesystems */
static const struct filesystem filesystems[] = {
{ file_fat_detectfs, file_fat_ls, file_fat_read, "FAT" },
@@ -204,5 +202,3 @@ file_read(const char *filename, void *buffer, unsigned long maxsize)
return filesystems[current_filesystem].read(arg, buffer, maxsize);
}
-
-#endif
OpenPOWER on IntegriCloud