Skip to contentSkip to conversation

usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

PATCH New Oliver Neukum 1 participant 1 message May 23, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH 4/12 usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

Am Donnerstag, den 17.05.2018, 19:03 +0200 schrieb Guido Kiener:

Quoted 5 lines

+       retval = usb_bulk_msg(data->usb_dev,
+                             usb_sndbulkpipe(data->usb_dev, +                                             data->bulk_out), +                             buffer, USBTMC_HEADER_SIZE, +                             &actual, file_data->timeout);

Review

Quoted 9 lines
(quoted diff) +9 -0
+
+       /* Store bTag (in case we need to abort) */
+       data->bTag_last_write = data->bTag;
+
+       /* Increment bTag -- and increment again if zero */
+       data->bTag++;
+       if (!data->bTag)
+               data->bTag++;
+

Independent of whether this needs to be split up, do you really want to do this regardless of usb_bulk_msg() returning an error?

Regards
Oliver
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html