Move the function to the top of the file to avoid forward declaration.
No functional change.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Chin Liang See <cl...@altera.com>
Cc: Dinh Nguyen <dingu...@altera.com>
Cc: Albert Aribaud <albert.u.b...@aribaud.net>
Cc: Tom Rini <tr...@ti.com>
Cc: Wolfgang Denk <w...@denx.de>
Cc: Pavel Machek <pa...@denx.de>
---
 drivers/fpga/altera.c | 58 +++++++++++++++++++++++----------------------------
 1 file changed, 26 insertions(+), 32 deletions(-)

diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c
index b0f323f..9e9df50 100644
--- a/drivers/fpga/altera.c
+++ b/drivers/fpga/altera.c
@@ -19,7 +19,32 @@
 #define FPGA_DEBUG     0
 
 /* Local Static Functions */
-static int altera_validate (Altera_desc * desc, const char *fn);
+static int altera_validate(Altera_desc *desc, const char *fn)
+{
+       if (!desc) {
+               printf("%s: NULL descriptor!\n", fn);
+               return false;
+       }
+
+       if ((desc->family < min_altera_type) ||
+           (desc->family > max_altera_type)) {
+               printf("%s: Invalid family type, %d\n", fn, desc->family);
+               return false;
+       }
+
+       if ((desc->iface < min_altera_iface_type) ||
+           (desc->iface > max_altera_iface_type)) {
+               printf("%s: Invalid Interface type, %d\n", fn, desc->iface);
+               return false;
+       }
+
+       if (!desc->size) {
+               printf("%s: NULL part size\n", fn);
+               return false;
+       }
+
+       return true;
+}
 
 /* ------------------------------------------------------------------------- */
 int altera_load(Altera_desc *desc, const void *buf, size_t bsize)
@@ -194,34 +219,3 @@ int altera_info(Altera_desc *desc)
 
        return ret_val;
 }
-
-/* ------------------------------------------------------------------------- */
-
-static int altera_validate(Altera_desc *desc, const char *fn)
-{
-       if (!desc) {
-               printf("%s: NULL descriptor!\n", fn);
-               return false;
-       }
-
-       if ((desc->family < min_altera_type) ||
-           (desc->family > max_altera_type)) {
-               printf("%s: Invalid family type, %d\n", fn, desc->family);
-               return false;
-       }
-
-       if ((desc->iface < min_altera_iface_type) ||
-           (desc->iface > max_altera_iface_type)) {
-               printf("%s: Invalid Interface type, %d\n", fn, desc->iface);
-               return false;
-       }
-
-       if (!desc->size) {
-               printf("%s: NULL part size\n", fn);
-               return false;
-       }
-
-       return true;
-}
-
-/* ------------------------------------------------------------------------- */
-- 
2.0.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to