Lines Matching refs:crc

690 	struct crc_data *crc = NULL;  in save_image_lzo()  local
715 crc = kzalloc(sizeof(*crc), GFP_KERNEL); in save_image_lzo()
716 if (!crc) { in save_image_lzo()
743 init_waitqueue_head(&crc->go); in save_image_lzo()
744 init_waitqueue_head(&crc->done); in save_image_lzo()
747 crc->crc32 = &handle->crc32; in save_image_lzo()
749 crc->unc[thr] = data[thr].unc; in save_image_lzo()
750 crc->unc_len[thr] = &data[thr].unc_len; in save_image_lzo()
753 crc->thr = kthread_run(crc32_threadfn, crc, "image_crc32"); in save_image_lzo()
754 if (IS_ERR(crc->thr)) { in save_image_lzo()
755 crc->thr = NULL; in save_image_lzo()
805 crc->run_threads = thr; in save_image_lzo()
806 atomic_set(&crc->ready, 1); in save_image_lzo()
807 wake_up(&crc->go); in save_image_lzo()
850 wait_event(crc->done, atomic_read(&crc->stop)); in save_image_lzo()
851 atomic_set(&crc->stop, 0); in save_image_lzo()
864 if (crc) { in save_image_lzo()
865 if (crc->thr) in save_image_lzo()
866 kthread_stop(crc->thr); in save_image_lzo()
867 kfree(crc); in save_image_lzo()
1180 struct crc_data *crc = NULL; in load_image_lzo() local
1205 crc = kzalloc(sizeof(*crc), GFP_KERNEL); in load_image_lzo()
1206 if (!crc) { in load_image_lzo()
1235 init_waitqueue_head(&crc->go); in load_image_lzo()
1236 init_waitqueue_head(&crc->done); in load_image_lzo()
1239 crc->crc32 = &handle->crc32; in load_image_lzo()
1241 crc->unc[thr] = data[thr].unc; in load_image_lzo()
1242 crc->unc_len[thr] = &data[thr].unc_len; in load_image_lzo()
1245 crc->thr = kthread_run(crc32_threadfn, crc, "image_crc32"); in load_image_lzo()
1246 if (IS_ERR(crc->thr)) { in load_image_lzo()
1247 crc->thr = NULL; in load_image_lzo()
1334 if (crc->run_threads) { in load_image_lzo()
1335 wait_event(crc->done, atomic_read(&crc->stop)); in load_image_lzo()
1336 atomic_set(&crc->stop, 0); in load_image_lzo()
1337 crc->run_threads = 0; in load_image_lzo()
1420 crc->run_threads = thr + 1; in load_image_lzo()
1421 atomic_set(&crc->ready, 1); in load_image_lzo()
1422 wake_up(&crc->go); in load_image_lzo()
1428 crc->run_threads = thr; in load_image_lzo()
1429 atomic_set(&crc->ready, 1); in load_image_lzo()
1430 wake_up(&crc->go); in load_image_lzo()
1434 if (crc->run_threads) { in load_image_lzo()
1435 wait_event(crc->done, atomic_read(&crc->stop)); in load_image_lzo()
1436 atomic_set(&crc->stop, 0); in load_image_lzo()
1458 if (crc) { in load_image_lzo()
1459 if (crc->thr) in load_image_lzo()
1460 kthread_stop(crc->thr); in load_image_lzo()
1461 kfree(crc); in load_image_lzo()