From patchwork Sun Aug 9 17:25:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 505445 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (unknown [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DABD51401E7 for ; Mon, 10 Aug 2015 03:25:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B42C4B954; Sun, 9 Aug 2015 19:25:14 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cq5jC6oTVD-p; Sun, 9 Aug 2015 19:25:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4A2F54B951; Sun, 9 Aug 2015 19:25:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 68B684B951 for ; Sun, 9 Aug 2015 19:25:11 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JTsCAwnn70BZ for ; Sun, 9 Aug 2015 19:25:11 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 0EEB14B950 for ; Sun, 9 Aug 2015 19:25:08 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id E0C006257; Sun, 9 Aug 2015 11:25:06 -0600 (MDT) Received: from dart.wwwdotorg.org (localhost [127.0.0.1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id 7C0F1E455C; Sun, 9 Aug 2015 11:25:05 -0600 (MDT) From: Stephen Warren To: Tom Rini Date: Sun, 9 Aug 2015 11:25:00 -0600 Message-Id: <1439141100-19827-1-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.9.1 X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.98.6 at avon.wwwdotorg.org X-Virus-Status: Clean Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] cm5200: fix FAT function prototypes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- 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(-) 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 #include +#include #include #include #include @@ -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;