diff mbox

[U-Boot] cm5200: fix FAT function prototypes

Message ID 1439141100-19827-1-git-send-email-swarren@wwwdotorg.org
State Awaiting Upstream
Delegated to: Tom Rini
Headers show

Commit Message

Stephen Warren Aug. 9, 2015, 5:25 p.m. UTC
Remove FAT function prototypes from the cm5200 firmware update code, and
include the relevant headers instead.

This exposes the fact that the custom prototyoe for do_fat_read() in
this file was incorrect. Rather than simply fixing the call-site, replace
do_fat_read() with fat_exists(). This removes the only use of
do_fat_read() outside of the FAT code.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
---
This should be applied before the series I posted that swaps out the FAT
filesystem implementation for ff.c.
---
 board/cm5200/fwupdate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Tom Rini Aug. 14, 2015, 8:52 p.m. UTC | #1
On Sun, Aug 09, 2015 at 11:25:00AM -0600, Stephen Warren wrote:

> Remove FAT function prototypes from the cm5200 firmware update code, and
> include the relevant headers instead.
> 
> This exposes the fact that the custom prototyoe for do_fat_read() in
> this file was incorrect. Rather than simply fixing the call-site, replace
> do_fat_read() with fat_exists(). This removes the only use of
> do_fat_read() outside of the FAT code.
> 
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/board/cm5200/fwupdate.c b/board/cm5200/fwupdate.c
index 06d50234e9ab..2b923624aea1 100644
--- a/board/cm5200/fwupdate.c
+++ b/board/cm5200/fwupdate.c
@@ -12,6 +12,7 @@ 
 
 #include <common.h>
 #include <command.h>
+#include <fat.h>
 #include <malloc.h>
 #include <image.h>
 #include <usb.h>
@@ -19,9 +20,6 @@ 
 
 #include "fwupdate.h"
 
-extern long do_fat_read(const char *, void *, unsigned long, int);
-extern int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
-
 static int load_rescue_image(ulong);
 
 void cm5200_fwupdate(void)
@@ -124,7 +122,7 @@  static int load_rescue_image(ulong addr)
 				/* Check if rescue image is present */
 				FW_DEBUG("Looking for firmware directory '%s'"
 					" on partition %d\n", fwdir, i);
-				if (do_fat_read(fwdir, NULL, 0, LS_NO) == -1) {
+				if (!fat_exists(fwdir)) {
 					FW_DEBUG("No NX rescue image on "
 						"partition %d.\n", i);
 					partno = -2;