]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - crypto/crypto_wq.c
Merge branch 'stable/for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel...
[thirdparty/kernel/stable.git] / crypto / crypto_wq.c
CommitLineData
2874c5fd 1// SPDX-License-Identifier: GPL-2.0-or-later
25c38d3f
HY
2/*
3 * Workqueue for crypto subsystem
4 *
5 * Copyright (c) 2009 Intel Corp.
6 * Author: Huang Ying <ying.huang@intel.com>
25c38d3f
HY
7 */
8
9#include <linux/workqueue.h>
4bb33cc8 10#include <linux/module.h>
25c38d3f
HY
11#include <crypto/algapi.h>
12#include <crypto/crypto_wq.h>
13
14struct workqueue_struct *kcrypto_wq;
15EXPORT_SYMBOL_GPL(kcrypto_wq);
16
17static int __init crypto_wq_init(void)
18{
c73b7d02
TH
19 kcrypto_wq = alloc_workqueue("crypto",
20 WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1);
25c38d3f
HY
21 if (unlikely(!kcrypto_wq))
22 return -ENOMEM;
23 return 0;
24}
25
26static void __exit crypto_wq_exit(void)
27{
28 destroy_workqueue(kcrypto_wq);
29}
30
130fa5bc 31subsys_initcall(crypto_wq_init);
25c38d3f
HY
32module_exit(crypto_wq_exit);
33
34MODULE_LICENSE("GPL");
35MODULE_DESCRIPTION("Workqueue for crypto subsystem");