Move static usbsn into serdev structure, remove serno access function

This commit is contained in:
Stefan Rueger
2023-01-02 16:55:33 +00:00
parent 8d8157bf8b
commit 0a883973a2
5 changed files with 11 additions and 25 deletions

View File

@@ -1569,9 +1569,9 @@ int jtag3_open_common(PROGRAMMER *pgm, const char *port) {
pmsg_notice("found CMSIS-DAP compliant device, using EDBG protocol\n");
}
// Get USB serial number function if function pointer is present
if (serial_serno)
pgm->usbsn = serial_serno();
// Copy over pointer to USB serial number function
if (serdev && serdev->usbsn)
pgm->usbsn = serdev->usbsn;
/*
* drain any extraneous input