Change in flashrom[master]: usbdev: Refactor device discovery code

Hello build bot (Jenkins), I'd like you to reexamine a change. Please visit https://review.coreboot.org/27444 to look at the new patch set (#2). Change subject: usbdev: Refactor device discovery code ...................................................................... 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> --- M usbdev.c 1 file changed, 57 insertions(+), 58 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/44/27444/2 -- To view, visit https://review.coreboot.org/27444 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: flashrom Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I31ed572501e4314b9455e1b70a5e934ec96408b1 Gerrit-Change-Number: 27444 Gerrit-PatchSet: 2 Gerrit-Owner: Daniel Thompson <daniel.thompson@linaro.org> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
participants (1)
-
Daniel Thompson (Code Review)