summaryrefslogtreecommitdiff
path: root/crypto/acompress.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-14 14:07:21 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-14 14:07:21 -0300
commitc65431e894d86b0baf6131048242944c738c227d (patch)
treec21d54144730f14380d5a58a6c3ae63d5f811b41 /crypto/acompress.c
parent69ef4995da43c512ffa7d4e57d5124489a0b417f (diff)
parentf087d7377871853f7162c3b61bcddb58bf3e6b9b (diff)
downloadlinux-crypto-c65431e894d86b0baf6131048242944c738c227d.tar.gz
linux-crypto-c65431e894d86b0baf6131048242944c738c227d.zip
Merge tag 'v4.12-rc1' into patchwork
Linux 4.12-rc1 * tag 'v4.12-rc1': (13212 commits) Linux 4.12-rc1 mm, docs: update memory.stat description with workingset* entries mm: vmscan: scan until it finds eligible pages mm, thp: copying user pages must schedule on collapse dax: fix PMD data corruption when fault races with write dax: fix data corruption when fault races with write ext4: return to starting transaction in ext4_dax_huge_fault() mm: fix data corruption due to stale mmap reads dax: prevent invalidation of mapped DAX entries Tigran has moved mm, vmalloc: fix vmalloc users tracking properly mm/khugepaged: add missed tracepoint for collapse_huge_page_swapin gcov: support GCC 7.1 mm, vmstat: Remove spurious WARN() during zoneinfo print time: delete current_fs_time() hwpoison, memcg: forcibly uncharge LRU pages sound: Disable the build of OSS drivers drm/i915: Make vblank evade warnings optional Input: cros_ec_keyb - remove extraneous 'const' drm/nouveau/therm: remove ineffective workarounds for alarm bugs ...
Diffstat (limited to 'crypto/acompress.c')
-rw-r--r--crypto/acompress.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/crypto/acompress.c b/crypto/acompress.c
index 47d11627..1544b7c0 100644
--- a/crypto/acompress.c
+++ b/crypto/acompress.c
@@ -166,5 +166,34 @@ int crypto_unregister_acomp(struct acomp_alg *alg)
}
EXPORT_SYMBOL_GPL(crypto_unregister_acomp);
+int crypto_register_acomps(struct acomp_alg *algs, int count)
+{
+ int i, ret;
+
+ for (i = 0; i < count; i++) {
+ ret = crypto_register_acomp(&algs[i]);
+ if (ret)
+ goto err;
+ }
+
+ return 0;
+
+err:
+ for (--i; i >= 0; --i)
+ crypto_unregister_acomp(&algs[i]);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(crypto_register_acomps);
+
+void crypto_unregister_acomps(struct acomp_alg *algs, int count)
+{
+ int i;
+
+ for (i = count - 1; i >= 0; --i)
+ crypto_unregister_acomp(&algs[i]);
+}
+EXPORT_SYMBOL_GPL(crypto_unregister_acomps);
+
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Asynchronous compression type");