| 1 | --- a/fs/yaffs2/yaffs_vfs_glue.c |
| 2 | +++ b/fs/yaffs2/yaffs_vfs_glue.c |
| 3 | @@ -273,8 +273,13 @@ static int yaffs_sync_object(struct file |
| 4 | static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir); |
| 5 | |
| 6 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 7 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 8 | +static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 9 | + struct nameidata *n); |
| 10 | +#else |
| 11 | static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, |
| 12 | struct nameidata *n); |
| 13 | +#endif |
| 14 | static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, |
| 15 | struct nameidata *n); |
| 16 | #else |
| 17 | @@ -286,9 +291,17 @@ static int yaffs_link(struct dentry *old |
| 18 | static int yaffs_unlink(struct inode *dir, struct dentry *dentry); |
| 19 | static int yaffs_symlink(struct inode *dir, struct dentry *dentry, |
| 20 | const char *symname); |
| 21 | + |
| 22 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 23 | +static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); |
| 24 | +#else |
| 25 | static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode); |
| 26 | +#endif |
| 27 | |
| 28 | -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 29 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 30 | +static int yaffs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 31 | + dev_t dev); |
| 32 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 33 | static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, |
| 34 | dev_t dev); |
| 35 | #else |
| 36 | @@ -1679,7 +1692,10 @@ out: |
| 37 | #define YCRED(x) (x->cred) |
| 38 | #endif |
| 39 | |
| 40 | -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 41 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 42 | +static int yaffs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 43 | + dev_t rdev) |
| 44 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 45 | static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, |
| 46 | dev_t rdev) |
| 47 | #else |
| 48 | @@ -1769,7 +1785,11 @@ static int yaffs_mknod(struct inode *dir |
| 49 | return error; |
| 50 | } |
| 51 | |
| 52 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 53 | +static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) |
| 54 | +#else |
| 55 | static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode) |
| 56 | +#endif |
| 57 | { |
| 58 | int retVal; |
| 59 | T(YAFFS_TRACE_OS, (TSTR("yaffs_mkdir\n"))); |
| 60 | @@ -1777,7 +1797,10 @@ static int yaffs_mkdir(struct inode *dir |
| 61 | return retVal; |
| 62 | } |
| 63 | |
| 64 | -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 65 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) |
| 66 | +static int yaffs_create(struct inode *dir, struct dentry *dentry, umode_t mode, |
| 67 | + struct nameidata *n) |
| 68 | +#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) |
| 69 | static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, |
| 70 | struct nameidata *n) |
| 71 | #else |
| 72 | |