We want to drop the 'head' parameter from request_submit as it barely service any purpose. This patch changes discover_data to figure out its 'tid' value from the device struct instead of looking into the request header. --- drivers/qmimodem/qmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c index 3d6009fa..538da02c 100644 --- a/drivers/qmimodem/qmi.c +++ b/drivers/qmimodem/qmi.c @@ -1272,7 +1272,9 @@ bool qmi_device_discover(struct qmi_device *device, qmi_discover_func_t func, QMI_CTL_GET_VERSION_INFO, NULL, 0, discover_callback, data, (void **) &hdr); - data->tid = hdr->transaction; + data->tid = device->next_control_tid - 1; + if (data->tid == 0) + data->tid = 255; data->timeout = g_timeout_add_seconds(5, discover_reply, data); __qmi_device_discovery_started(device, &data->super); -- 2.15.1