projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel: move linux/ath9k_platform.h to generic files so that it can be reused from...
[openwrt.git]
/
target
/
linux
/
generic
/
files
/
crypto
/
ocf
/
cryptodev.c
diff --git
a/target/linux/generic/files/crypto/ocf/cryptodev.c
b/target/linux/generic/files/crypto/ocf/cryptodev.c
index
c1e9140
..
2ee3618
100644
(file)
--- a/
target/linux/generic/files/crypto/ocf/cryptodev.c
+++ b/
target/linux/generic/files/crypto/ocf/cryptodev.c
@@
-39,7
+39,8
@@
__FBSDID("$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.34 2007/05/09 19:37:02 gnn Exp $");
*/
__FBSDID("$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.34 2007/05/09 19:37:02 gnn Exp $");
*/
-#ifndef AUTOCONF_INCLUDED
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED)
#include <linux/config.h>
#endif
#include <linux/types.h>
#include <linux/config.h>
#endif
#include <linux/types.h>
@@
-57,7
+58,6
@@
__FBSDID("$FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.34 2007/05/09 19:37:02 gn
#include <linux/file.h>
#include <linux/mount.h>
#include <linux/miscdevice.h>
#include <linux/file.h>
#include <linux/mount.h>
#include <linux/miscdevice.h>
-#include <linux/version.h>
#include <asm/uaccess.h>
#include <cryptodev.h>
#include <asm/uaccess.h>
#include <cryptodev.h>
@@
-977,10
+977,16
@@
cryptodev_open(struct inode *inode, struct file *filp)
struct fcrypt *fcr;
dprintk("%s()\n", __FUNCTION__);
struct fcrypt *fcr;
dprintk("%s()\n", __FUNCTION__);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
+ /*
+ * on 2.6.35 private_data points to a miscdevice structure, we override
+ * it, which is currently safe to do.
+ */
if (filp->private_data) {
if (filp->private_data) {
- printk("cryptodev: Private data already exists
!\n"
);
- return(
0
);
+ printk("cryptodev: Private data already exists
- %p!\n", filp->private_data
);
+ return(
-ENODEV
);
}
}
+#endif
fcr = kmalloc(sizeof(*fcr), GFP_KERNEL);
if (!fcr) {
fcr = kmalloc(sizeof(*fcr), GFP_KERNEL);
if (!fcr) {
This page took
0.026553 seconds
and
4
git commands to generate.