ft2232: cleanup

Previous patch somehow made GCC lose some of its cookies;
work around, zero-init that struct.

Clean up code from the previous patch.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
David Brownell 2009-11-04 21:41:08 -08:00
parent 2970696e89
commit 2d9863e121
1 changed files with 83 additions and 96 deletions

View File

@ -3256,7 +3256,7 @@ static int signalyzer_h_init(void)
char *end_of_desc;
uint16_t read_buf[12];
uint16_t read_buf[12] = { 0 };
uint8_t buf[3];
uint32_t bytes_written;
@ -3938,24 +3938,18 @@ static int ktlink_init(void)
enum reset_types jtag_reset_config = jtag_get_reset_config();
if (jtag_reset_config & RESET_TRST_OPEN_DRAIN)
{
if (jtag_reset_config & RESET_TRST_OPEN_DRAIN) {
high_output |= nTRSTnOE;
high_output &= ~nTRST;
}
else
{
} else {
high_output &= ~nTRSTnOE;
high_output |= nTRST;
}
if (jtag_reset_config & RESET_SRST_PUSH_PULL)
{
if (jtag_reset_config & RESET_SRST_PUSH_PULL) {
high_output &= ~nSRSTnOE;
high_output |= nSRST;
}
else
{
} else {
high_output |= nSRSTnOE;
high_output &= ~nSRST;
}
@ -3979,30 +3973,24 @@ static void ktlink_reset(int trst, int srst)
{
enum reset_types jtag_reset_config = jtag_get_reset_config();
if (trst == 1)
{
if (trst == 1) {
if (jtag_reset_config & RESET_TRST_OPEN_DRAIN)
high_output &= ~nTRSTnOE;
else
high_output &= ~nTRST;
}
else if (trst == 0)
{
} else if (trst == 0) {
if (jtag_reset_config & RESET_TRST_OPEN_DRAIN)
high_output |= nTRSTnOE;
else
high_output |= nTRST;
}
if (srst == 1)
{
if (srst == 1) {
if (jtag_reset_config & RESET_SRST_PUSH_PULL)
high_output &= ~nSRST;
else
high_output &= ~nSRSTnOE;
}
else if (srst == 0)
{
} else if (srst == 0) {
if (jtag_reset_config & RESET_SRST_PUSH_PULL)
high_output |= nSRST;
else
@ -4027,4 +4015,3 @@ static void ktlink_blink(void)
buffer_write(high_output);
buffer_write(high_direction);
}