Lines Matching refs:wait_data

408 	struct cdx_mcdi_blocking_data *wait_data =  in cdx_mcdi_rpc_completer()  local
411 wait_data->rc = rc; in cdx_mcdi_rpc_completer()
412 memcpy(wait_data->outbuf, outbuf, in cdx_mcdi_rpc_completer()
413 min(outlen_actual, wait_data->outlen)); in cdx_mcdi_rpc_completer()
414 wait_data->outlen_actual = outlen_actual; in cdx_mcdi_rpc_completer()
417 wait_data->done = true; in cdx_mcdi_rpc_completer()
418 wake_up(&wait_data->wq); in cdx_mcdi_rpc_completer()
419 kref_put(&wait_data->ref, cdx_mcdi_blocking_data_release); in cdx_mcdi_rpc_completer()
427 struct cdx_mcdi_blocking_data *wait_data; in cdx_mcdi_rpc_sync() local
435 wait_data = kmalloc(sizeof(*wait_data), GFP_KERNEL); in cdx_mcdi_rpc_sync()
436 if (!wait_data) in cdx_mcdi_rpc_sync()
441 kfree(wait_data); in cdx_mcdi_rpc_sync()
445 kref_init(&wait_data->ref); in cdx_mcdi_rpc_sync()
446 wait_data->done = false; in cdx_mcdi_rpc_sync()
447 init_waitqueue_head(&wait_data->wq); in cdx_mcdi_rpc_sync()
448 wait_data->outbuf = outbuf; in cdx_mcdi_rpc_sync()
449 wait_data->outlen = outlen; in cdx_mcdi_rpc_sync()
453 cmd_item->cookie = (unsigned long)wait_data; in cdx_mcdi_rpc_sync()
460 kref_get(&wait_data->ref); in cdx_mcdi_rpc_sync()
463 kref_put(&wait_data->ref, cdx_mcdi_blocking_data_release); in cdx_mcdi_rpc_sync()
467 if (!wait_event_timeout(wait_data->wq, wait_data->done, in cdx_mcdi_rpc_sync()
469 !wait_data->done) { in cdx_mcdi_rpc_sync()
475 wait_data->rc = -ETIMEDOUT; in cdx_mcdi_rpc_sync()
476 wait_data->outlen_actual = 0; in cdx_mcdi_rpc_sync()
480 *outlen_actual = wait_data->outlen_actual; in cdx_mcdi_rpc_sync()
481 rc = wait_data->rc; in cdx_mcdi_rpc_sync()
484 kref_put(&wait_data->ref, cdx_mcdi_blocking_data_release); in cdx_mcdi_rpc_sync()