This is an automated email from Gerrit. Paul Fertser (fercer...@gmail.com) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1375
-- gerrit commit b9467cb92e59cae2a67a256cb8becaba4a0c22ef Author: Paul Fertser <fercer...@gmail.com> Date: Fri May 3 12:49:07 2013 +0400 sysfsgpio: do not try to initialise absent signals When e.g. SRST is not specified, the current code results in assigning 0 to srst_fd and subsequently a stray '1' is output on screen on reset. Avoid this by not doing bogus initialisation. Change-Id: Iadb847a384a927ae746124cf6e4e3c6cc8b11406 Signed-off-by: Paul Fertser <fercer...@gmail.com> diff --git a/src/jtag/drivers/sysfsgpio.c b/src/jtag/drivers/sysfsgpio.c index 283ec44..f77371c 100644 --- a/src/jtag/drivers/sysfsgpio.c +++ b/src/jtag/drivers/sysfsgpio.c @@ -475,14 +475,18 @@ static int sysfsgpio_init(void) goto out_error; /* assume active low*/ - trst_fd = setup_sysfs_gpio(trst_gpio, 1, 1); - if (trst_gpio > 0 && trst_fd < 0) - goto out_error; + if (trst_gpio > 0) { + trst_fd = setup_sysfs_gpio(trst_gpio, 1, 1); + if (trst_fd < 0) + goto out_error; + } /* assume active low*/ - srst_fd = setup_sysfs_gpio(srst_gpio, 1, 1); - if (srst_gpio > 0 && srst_fd < 0) - goto out_error; + if (srst_gpio > 0) { + srst_fd = setup_sysfs_gpio(srst_gpio, 1, 1); + if (srst_fd < 0) + goto out_error; + } return ERROR_OK; -- ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel