Browse Source

fs: fat: Drop CONFIG_SUPPORT_VFAT

fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since
2003), so as a result VFAT support is always enabled regardless of
whether a board config defines it or not. Drop this unnecessary option.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
Tuomas Tynkkynen 7 năm trước cách đây
mục cha
commit
8bad6cb176

+ 1 - 11
fs/fat/fat.c

@@ -22,12 +22,6 @@
 #include <linux/compiler.h>
 #include <linux/ctype.h>
 
-#ifdef CONFIG_SUPPORT_VFAT
-static const int vfat_enabled = 1;
-#else
-static const int vfat_enabled = 0;
-#endif
-
 /*
  * Convert a string to lowercase.  Converts at most 'len' characters,
  * 'len' may be larger than the length of 'str' if 'str' is NULL
@@ -605,9 +599,6 @@ static int get_fs_info(fsdata *mydata)
 		return -1;
 	}
 
-	if (vfat_enabled)
-		debug("VFAT Support enabled\n");
-
 	debug("FAT%d, fat_sect: %d, fatlength: %d\n",
 	       mydata->fatsize, mydata->fat_sect, mydata->fatlength);
 	debug("Rootdir begins at cluster: %d, sector: %d, offset: %x\n"
@@ -857,8 +848,7 @@ static int fat_itr_next(fat_itr *itr)
 			continue;
 
 		if (dent->attr & ATTR_VOLUME) {
-			if (vfat_enabled &&
-			    (dent->attr & ATTR_VFAT) == ATTR_VFAT &&
+			if ((dent->attr & ATTR_VFAT) == ATTR_VFAT &&
 			    (dent->name[0] & LAST_LONG_ENTRY_MASK)) {
 				dent = extract_vfat_name(itr);
 				if (!dent)

+ 1 - 2
fs/fat/fat_write.c

@@ -819,8 +819,7 @@ static dir_entry *find_directory_entry(fsdata *mydata, int startsect,
 				continue;
 			}
 			if ((dentptr->attr & ATTR_VOLUME)) {
-				if (vfat_enabled &&
-				    (dentptr->attr & ATTR_VFAT) &&
+				if ((dentptr->attr & ATTR_VFAT) &&
 				    (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) {
 					get_long_file_name(mydata, curclust,
 						     get_dentfromdir_block,

+ 0 - 8
include/configs/MPC8349ITX.h

@@ -470,14 +470,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_BOOTP_GATEWAY
 #define CONFIG_BOOTP_HOSTNAME
 
-#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) \
-				|| defined(CONFIG_USB_STORAGE)
-	#define CONFIG_SUPPORT_VFAT
-#endif
-
-#if defined(CONFIG_SATA_SIL3114) || defined(CONFIG_USB_STORAGE)
-#endif
-
 /* Watchdog */
 #undef CONFIG_WATCHDOG		/* watchdog disabled */
 

+ 0 - 1
include/configs/apf27.h

@@ -204,7 +204,6 @@
  */
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
-#define CONFIG_SUPPORT_VFAT
 
 /*
  * Ethernet (on SOC imx FEC)

+ 0 - 5
include/configs/clearfog.h

@@ -40,11 +40,6 @@
  */
 #define CONFIG_SYS_MMC_BASE		MVEBU_SDIO_BASE
 
-/* Partition support */
-
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* USB/EHCI configuration */
 #define CONFIG_EHCI_IS_TDI
 

+ 0 - 3
include/configs/controlcenterdc.h

@@ -54,9 +54,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* USB/EHCI configuration */
 #define CONFIG_EHCI_IS_TDI
 

+ 0 - 3
include/configs/db-88f6720.h

@@ -49,9 +49,6 @@
 
 #define CONFIG_SYS_ALT_MEMTEST
 
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /*
  * mv-common.h should be defined after CMD configs since it used them
  * to enable certain macros

+ 0 - 5
include/configs/db-88f6820-amc.h

@@ -30,11 +30,6 @@
 #define CONFIG_SF_DEFAULT_SPEED		1000000
 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
 
-/* Partition support */
-
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* USB/EHCI configuration */
 #define CONFIG_EHCI_IS_TDI
 

+ 0 - 5
include/configs/db-88f6820-gp.h

@@ -50,11 +50,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-/* Partition support */
-
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* USB/EHCI configuration */
 #define CONFIG_EHCI_IS_TDI
 

+ 0 - 3
include/configs/db-mv784mp-gp.h

@@ -51,9 +51,6 @@
 #define CONFIG_SYS_SATA_MAX_DEVICE	2
 #define CONFIG_LBA48
 
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* PCIe support */
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_PCI_MVEBU

+ 0 - 1
include/configs/ds414.h

@@ -68,7 +68,6 @@
 #endif
 
 /* why is this only defined in mv-common.h if CONFIG_DM is undefined? */
-#define CONFIG_SUPPORT_VFAT
 #define CONFIG_SYS_MVFS
 
 /*

+ 0 - 1
include/configs/edminiv2.h

@@ -165,7 +165,6 @@
  */
 #ifdef CONFIG_CMD_USB
 #define ORION5X_USB20_HOST_PORT_BASE ORION5X_USB20_PORT0_BASE
-#define CONFIG_SUPPORT_VFAT
 #endif /* CONFIG_CMD_USB */
 
 /*

+ 0 - 2
include/configs/gplugd.h

@@ -85,6 +85,4 @@
 #define CONFIG_EHCI_IS_TDI
 #endif /* CONFIG_CMD_USB */
 
-#define CONFIG_SUPPORT_VFAT
-
 #endif	/* __CONFIG_GPLUGD_H */

+ 0 - 7
include/configs/mv-common.h

@@ -115,13 +115,6 @@
 #ifdef CONFIG_CMD_SF
 #endif
 
-/*
- * Common USB/EHCI configuration
- */
-#if defined(CONFIG_CMD_USB) && !defined(CONFIG_DM)
-#define CONFIG_SUPPORT_VFAT
-#endif /* CONFIG_CMD_USB */
-
 /*
  * File system
  */

+ 0 - 2
include/configs/mvebu_armada-37xx.h

@@ -102,8 +102,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-#define CONFIG_SUPPORT_VFAT
-
 #include <config_distro_defaults.h>
 
 #define BOOT_TARGET_DEVICES(func) \

+ 0 - 2
include/configs/mvebu_armada-8k.h

@@ -105,8 +105,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-#define CONFIG_SUPPORT_VFAT
-
 /*
  * PCI configuration
  */

+ 0 - 1
include/configs/nas220.h

@@ -91,7 +91,6 @@
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_EHCI_KIRKWOOD	/* on Kirkwood platform	*/
 #define CONFIG_EHCI_IS_TDI
-#define CONFIG_SUPPORT_VFAT
 #endif /* CONFIG_CMD_USB */
 
 /*

+ 0 - 6
include/configs/pic32mzdask.h

@@ -81,12 +81,6 @@
  * USB Configuration
  */
 
-/*-----------------------------------------------------------------------
- * File System Configuration
- */
-/* FAT FS */
-#define CONFIG_SUPPORT_VFAT
-
 /* -------------------------------------------------
  * Environment
  */

+ 0 - 3
include/configs/rcar-gen2-common.h

@@ -11,9 +11,6 @@
 
 #include <asm/arch/rmobile.h>
 
-/* Support File sytems */
-#define CONFIG_SUPPORT_VFAT
-
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG

+ 0 - 3
include/configs/rcar-gen3-common.h

@@ -17,9 +17,6 @@
 /* boot option */
 #define CONFIG_SUPPORT_RAW_INITRD
 
-/* Support File sytems */
-#define CONFIG_SUPPORT_VFAT
-
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_INITRD_TAG

+ 0 - 2
include/configs/rk3128_common.h

@@ -30,8 +30,6 @@
 /* MMC/SD IP block */
 #define CONFIG_BOUNCE_BUFFER
 
-#define CONFIG_SUPPORT_VFAT
-
 /* RAW SD card / eMMC locations. */
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(128 << 10)
 

+ 0 - 2
include/configs/rk3328_common.h

@@ -24,8 +24,6 @@
 /* MMC/SD IP block */
 #define CONFIG_BOUNCE_BUFFER
 
-#define CONFIG_SUPPORT_VFAT
-
 /* RAW SD card / eMMC locations. */
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(128 << 10)
 

+ 0 - 2
include/configs/rk3399_common.h

@@ -38,8 +38,6 @@
 #define CONFIG_BOUNCE_BUFFER
 #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ	200000000
 
-#define CONFIG_SUPPORT_VFAT
-
 /* RAW SD card / eMMC locations. */
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(128 << 10)
 

+ 0 - 3
include/configs/theadorable.h

@@ -67,9 +67,6 @@
 #define CONFIG_SYS_SATA_MAX_DEVICE	1
 #define CONFIG_LBA48
 
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* PCIe support */
 #ifdef CONFIG_CMD_PCI
 #ifndef CONFIG_SPL_BUILD

+ 0 - 3
include/configs/turris_omnia.h

@@ -59,9 +59,6 @@
 #define CONFIG_SYS_SCSI_MAX_DEVICE	(CONFIG_SYS_SCSI_MAX_SCSI_ID * \
 					 CONFIG_SYS_SCSI_MAX_LUN)
 
-/* Additional FS support/configuration */
-#define CONFIG_SUPPORT_VFAT
-
 /* USB/EHCI configuration */
 #define CONFIG_EHCI_IS_TDI
 

+ 0 - 1
include/configs/vct.h

@@ -72,7 +72,6 @@
  * Commands
  */
 #if defined(CONFIG_CMD_USB)
-#define CONFIG_SUPPORT_VFAT
 
 /*
  * USB/EHCI

+ 0 - 4
include/configs/x600.h

@@ -96,10 +96,6 @@
 #define CONFIG_USB_EHCI_SPEAR
 #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
 
-/* Filesystem support (for USB key) */
-#define CONFIG_SUPPORT_VFAT
-
-
 /*
  * U-Boot Environment placing definitions.
  */

+ 0 - 2
include/configs/x86-common.h

@@ -58,8 +58,6 @@
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_AUTO_COMPLETE
 
-#define CONFIG_SUPPORT_VFAT
-
 /*-----------------------------------------------------------------------
  * Command line configuration.
  */

+ 0 - 1
include/configs/zmx25.h

@@ -82,7 +82,6 @@
 #define CONFIG_MXC_USB_PORTSC	MXC_EHCI_MODE_SERIAL
 #define CONFIG_MXC_USB_FLAGS	(MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN)
 #define CONFIG_EHCI_IS_TDI
-#define CONFIG_SUPPORT_VFAT
 #endif /* CONFIG_CMD_USB */
 
 /* SDRAM */

+ 0 - 4
include/configs/zynq-common.h

@@ -124,10 +124,6 @@
 # define DFU_ALT_INFO
 #endif
 
-#if defined(CONFIG_MMC_SDHCI_ZYNQ) || defined(CONFIG_ZYNQ_USB)
-# define CONFIG_SUPPORT_VFAT
-#endif
-
 #if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1)
 #define CONFIG_SYS_I2C_ZYNQ
 #endif

+ 0 - 1
include/fat.h

@@ -13,7 +13,6 @@
 #include <asm/byteorder.h>
 #include <fs.h>
 
-#define CONFIG_SUPPORT_VFAT
 /* Maximum Long File Name length supported here is 128 UTF-16 code units */
 #define VFAT_MAXLEN_BYTES	256 /* Maximum LFN buffer in bytes */
 #define VFAT_MAXSEQ		9   /* Up to 9 of 13 2-byte UTF-16 entries */

+ 0 - 1
scripts/config_whitelist.txt

@@ -2163,7 +2163,6 @@ CONFIG_SUPERH_ON_CHIP_R8A66597
 CONFIG_SUPPORT_EMMC_BOOT
 CONFIG_SUPPORT_EMMC_RPMB
 CONFIG_SUPPORT_RAW_INITRD
-CONFIG_SUPPORT_VFAT
 CONFIG_SUVD3
 CONFIG_SXNI855T
 CONFIG_SYSFLAGS_ADDR