return 0;
}
-static void greybus_kill_gbuf(struct gbuf *gbuf)
+static void gb_message_cancel(struct gb_message *message)
{
- if (gbuf->status != -EINPROGRESS)
+ if (message->gbuf.status != -EINPROGRESS)
return;
- gbuf->hd->driver->buffer_cancel(gbuf->hcd_data);
+ message->gbuf.hd->driver->buffer_cancel(message->gbuf.hcd_data);
}
/*
ret = wait_for_completion_interruptible(&operation->completion);
/* If interrupted, cancel the in-flight buffer */
if (ret < 0)
- greybus_kill_gbuf(&operation->request.gbuf);
+ gb_message_cancel(&operation->request);
return ret;
}
void gb_operation_cancel(struct gb_operation *operation)
{
operation->canceled = true;
- greybus_kill_gbuf(&operation->request.gbuf);
+ gb_message_cancel(&operation->request);
if (operation->response.gbuf.transfer_buffer)
- greybus_kill_gbuf(&operation->response.gbuf);
+ gb_message_cancel(&operation->response);
}
int gb_operation_init(void)