summaryrefslogtreecommitdiffstats
path: root/ch341a_spi.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2018-07-12 12:03:51 +0100
committerNico Huber <nico.h@gmx.de>2018-08-30 09:54:50 +0000
commitaf499198a49fe342a0bb3dbbfa362b8788a8fb4e (patch)
tree1d3b92f384508e6622ed91240a50477a07884148 /ch341a_spi.c
parent1d507a07a919f49e74aa05803bf37919ac95adb1 (diff)
downloadflashrom-af499198a49fe342a0bb3dbbfa362b8788a8fb4e.tar.gz
flashrom-af499198a49fe342a0bb3dbbfa362b8788a8fb4e.tar.bz2
flashrom-af499198a49fe342a0bb3dbbfa362b8788a8fb4e.zip
usbdev: Refactor device discovery code
Currently there is a lot of code shared between usb_dev_get_by_vid_pid_serial() and usb_dev_get_by_vid_pid_number(). Fix this by pulling out the conditional filtering at the heart of each loop and calling it via a function pointer. I haven't got (two) dediprog programmers to test with but I have tested both by...serial() and by...number() calls using a pair of Developerboxen and a hacked driver. Change-Id: I31ed572501e4314b9455e1b70a5e934ec96408b1 Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-on: https://review.coreboot.org/27444 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'ch341a_spi.c')
0 files changed, 0 insertions, 0 deletions