On Tue, Jul 01, 2008 at 01:45:23AM +0200, [EMAIL PROTECTED] wrote:
> New Revision: 3401
..
> Pardon me for pushing this in

Mostly good cleanups (thanks for removing temp16 et al) but
it87xx_probe_spi_flash() got a lot worse IMO. Patch attached.

The name is also rather unfortunate, since it is used for board
enable rather than chip probing, but that is for later.


//Peter
flashrom: Small cleanup, big readability improvement

Signed-off-by: Peter Stuge <[EMAIL PROTECTED]>

Index: it87spi.c
===================================================================
--- it87spi.c	(revision 3401)
+++ it87spi.c	(working copy)
@@ -113,14 +113,14 @@
 int it87xx_probe_spi_flash(const char *name)
 {
 	it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT1);
-
-	if (!it8716f_flashport)
+	if (!it8716f_flashport) {
 		it8716f_flashport = find_ite_spi_flash_port(ITE_SUPERIO_PORT2);
+		if (!it8716f_flashport)
+			return 1;
+	}
 
-	if (it8716f_flashport)
-		flashbus = BUS_TYPE_IT87XX_SPI;
-
-	return (!it8716f_flashport);
+	flashbus = BUS_TYPE_IT87XX_SPI;
+	return 0;
 }
 
 /* The IT8716F only supports commands with length 1,2,4,5 bytes including
-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to