[flashrom] [PATCH 3/3] Cleanup ft2322.c

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Tue Sep 4 01:53:47 CEST 2012


Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
 ft2232_spi.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/ft2232_spi.c b/ft2232_spi.c
index 43a95e9..625dd06 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -64,8 +64,7 @@ const struct usbdev_status devs_ft2232spi[] = {
 	{FTDI_VID, TIAO_TUMPA_PID, OK, "TIAO", "USB Multi-Protocol Adapter"},
 	{FTDI_VID, AMONTEC_JTAGKEY_PID, OK, "Amontec", "JTAGkey"},
 	{GOEPEL_VID, GOEPEL_PICOTAP_PID, OK, "GOEPEL", "PicoTAP"},
-	{FIC_VID, OPENMOKO_DBGBOARD_PID, OK, "FIC",
-		"OpenMoko Neo1973 Debug board (V2+)"},
+	{FIC_VID, OPENMOKO_DBGBOARD_PID, OK, "FIC", "OpenMoko Neo1973 Debug board (V2+)"},
 	{OLIMEX_VID, OLIMEX_ARM_OCD_PID, NT, "Olimex", "ARM-USB-OCD"},
 	{OLIMEX_VID, OLIMEX_ARM_TINY_PID, OK, "Olimex", "ARM-USB-TINY"},
 	{OLIMEX_VID, OLIMEX_ARM_OCD_H_PID, NT, "Olimex", "ARM-USB-OCD-H"},
@@ -74,7 +73,6 @@ const struct usbdev_status devs_ft2232spi[] = {
 	{0},
 };
 
-
 #define DEFAULT_DIVISOR 2
 
 #define BITMODE_BITBANG_NORMAL	1
@@ -251,6 +249,7 @@ int ft2232_spi_init(void)
 		}
 	}
 	free(arg);
+
 	arg = extract_programmer_param("port");
 	if (arg) {
 		switch (toupper((unsigned char)*arg)) {
@@ -298,6 +297,7 @@ int ft2232_spi_init(void)
 		}
 	}
 	free(arg);
+
 	msg_pdbg("Using device type %s %s ",
 		 get_ft2232_vendorname(ft2232_vid, ft2232_type),
 		 get_ft2232_devicename(ft2232_vid, ft2232_type));
@@ -318,14 +318,12 @@ int ft2232_spi_init(void)
 	f = ftdi_usb_open(ftdic, ft2232_vid, ft2232_type);
 
 	if (f < 0 && f != -5) {
-		msg_perr("Unable to open FTDI device: %d (%s)\n", f,
-				ftdi_get_error_string(ftdic));
+		msg_perr("Unable to open FTDI device: %d (%s)\n", f, ftdi_get_error_string(ftdic));
 		return -4;
 	}
 
 	if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H && ftdic->type != TYPE_232H) {
-		msg_pdbg("FTDI chip type %d is not high-speed\n",
-			ftdic->type);
+		msg_pdbg("FTDI chip type %d is not high-speed\n", ftdic->type);
 		clock_5x = 0;
 	}
 
@@ -386,8 +384,6 @@ int ft2232_spi_init(void)
 		goto ftdi_err;
 	}
 
-	// msg_pdbg("\nft2232 chosen\n");
-
 	register_spi_programmer(&spi_programmer_ft2232);
 
 	return 0;
-- 
Kind regards, Stefan Tauner





More information about the flashrom mailing list