[U-Boot] [PATCH 12/20] ahci: Put all uses of ahci_set_feature() under CONFIG_AHCI_SETFEATURES_XFER

Simon Glass sjg at chromium.org
Fri Oct 19 05:45:09 CEST 2012


From: Taylor Hutt <thutt at chromium.org>

The function ahci_set_feature() is only compiled when the manifest
constant 'CONFIG_AHCI_SETFEATURES_XFER' is defined, but it is used
once outside of such a conditional.

This change puts all uses of the function under the same preprocessor
conditional.

It also fixes a spelling error in a message which can be output to the
console.

Signed-off-by: Taylor Hutt <thutt at chromium.org>
Signed-off-by: Simon Glass <sjg at chromium.org>
---
 drivers/block/ahci.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 2c60eb9..20c5336 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -478,7 +478,7 @@ static int ahci_device_data_io(u8 port, u8 *fis, int fis_len, u8 *buf,
 	debug("Enter %s: for port %d\n", __func__, port);
 
 	if (port > probe_ent->n_ports) {
-		printf("Invaild port number %d\n", port);
+		printf("Invalid port number %d\n", port);
 		return -1;
 	}
 
@@ -839,7 +839,9 @@ int ahci_init(u32 base)
 				printf("Can not start port %d\n", i);
 				continue;
 			}
+#ifdef CONFIG_AHCI_SETFEATURES_XFER
 			ahci_set_feature((u8) i);
+#endif
 		}
 	}
 err_out:
-- 
1.7.7.3



More information about the U-Boot mailing list