diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-08-19 13:27:58 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-08-19 13:27:58 +0000 |
commit | 8141a8d70675639abd75db09db0af3a3dfb4e98d (patch) | |
tree | 78525e6b9821679dbf87c69dc56c8af7182e04c2 /flashrom.c | |
parent | c73d5d2e3d73863994e52d15f234a67bbf4ca90a (diff) | |
download | flashrom-8141a8d70675639abd75db09db0af3a3dfb4e98d.zip flashrom-8141a8d70675639abd75db09db0af3a3dfb4e98d.tar.gz |
If FT2232H SPI is not enabled, it should be compiled out completely
We can't remove ft2232_spi.o from unconditional OBJS yet due to our makefile
structure (make features), but this patch adds #ifdefs around all FT2232H code,
so the net effect is the same.
Corresponding to flashrom svn r691.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Diffstat (limited to 'flashrom.c')
-rw-r--r-- | flashrom.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -122,6 +122,7 @@ const struct programmer_entry programmer_table[] = { .delay = internal_delay, }, +#if FT2232_SPI_SUPPORT == 1 { .name = "ft2232spi", .init = ft2232_spi_init, @@ -138,6 +139,7 @@ const struct programmer_entry programmer_table[] = { .chip_writen = fallback_chip_writen, .delay = internal_delay, }, +#endif #if SERPROG_SUPPORT == 1 { @@ -610,6 +612,10 @@ int main(int argc, char *argv[]) fprintf(stderr, "Programmer table miscompilation!\n"); exit(1); } + if (spi_programmer_count - 1 != SPI_CONTROLLER_INVALID) { + fprintf(stderr, "SPI programmer table miscompilation!\n"); + exit(1); + } setbuf(stdout, NULL); while ((opt = getopt_long(argc, argv, "rRwvnVEfc:m:l:i:p:Lzh", |