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

@@ -1578,9 +1578,9 @@ static int stk500v2_open(PROGRAMMER *pgm, const char *port) {
return -1;
}
// 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