ia64/linux-2.6.18-xen.hg

annotate crypto/compress.c @ 740:bf8b1ee634e2

balloon: Fix the build by including <linux/init.h>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 25 11:19:41 2008 +0000 (2008-11-25)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * Cryptographic API.
ian@0 3 *
ian@0 4 * Compression operations.
ian@0 5 *
ian@0 6 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
ian@0 7 *
ian@0 8 * This program is free software; you can redistribute it and/or modify it
ian@0 9 * under the terms of the GNU General Public License as published by the Free
ian@0 10 * Software Foundation; either version 2 of the License, or (at your option)
ian@0 11 * any later version.
ian@0 12 *
ian@0 13 */
ian@0 14 #include <linux/types.h>
ian@0 15 #include <linux/crypto.h>
ian@0 16 #include <linux/errno.h>
ian@0 17 #include <asm/scatterlist.h>
ian@0 18 #include <linux/string.h>
ian@0 19 #include "internal.h"
ian@0 20
ian@0 21 static int crypto_compress(struct crypto_tfm *tfm,
ian@0 22 const u8 *src, unsigned int slen,
ian@0 23 u8 *dst, unsigned int *dlen)
ian@0 24 {
ian@0 25 return tfm->__crt_alg->cra_compress.coa_compress(tfm, src, slen, dst,
ian@0 26 dlen);
ian@0 27 }
ian@0 28
ian@0 29 static int crypto_decompress(struct crypto_tfm *tfm,
ian@0 30 const u8 *src, unsigned int slen,
ian@0 31 u8 *dst, unsigned int *dlen)
ian@0 32 {
ian@0 33 return tfm->__crt_alg->cra_compress.coa_decompress(tfm, src, slen, dst,
ian@0 34 dlen);
ian@0 35 }
ian@0 36
ian@0 37 int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags)
ian@0 38 {
ian@0 39 return flags ? -EINVAL : 0;
ian@0 40 }
ian@0 41
ian@0 42 int crypto_init_compress_ops(struct crypto_tfm *tfm)
ian@0 43 {
ian@0 44 struct compress_tfm *ops = &tfm->crt_compress;
ian@0 45
ian@0 46 ops->cot_compress = crypto_compress;
ian@0 47 ops->cot_decompress = crypto_decompress;
ian@0 48
ian@0 49 return 0;
ian@0 50 }
ian@0 51
ian@0 52 void crypto_exit_compress_ops(struct crypto_tfm *tfm)
ian@0 53 {
ian@0 54 }