update code. now compiles on 2.6.35.
This commit is contained in:
parent
04660bc897
commit
9245824a65
@ -20,6 +20,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/mm.h>
|
||||
#include "fpgafs.h"
|
||||
|
||||
|
@ -67,7 +67,7 @@ static int fpgafs_recv_data_rag(struct fpga_context *ctx, unsigned char *buf, in
|
||||
return -EINVAL;
|
||||
|
||||
for(i=0; i < len; i+=2) {
|
||||
d=readw((void *)((unsigned int)vaddr | 0x20));
|
||||
d=readw((void *)((unsigned long)vaddr | 0x20));
|
||||
b[i] = d & 0xff;
|
||||
b[i+1] = d >> 8;
|
||||
if (copy_to_user(b, ctx->load_buf, 2))
|
||||
|
7
inode.c
7
inode.c
@ -22,6 +22,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/pagemap.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
#include "fpgafs.h"
|
||||
|
||||
@ -45,7 +46,7 @@ const struct file_operations fpgafs_context_foperations = {
|
||||
.llseek = dcache_dir_lseek,
|
||||
.read = generic_read_dir,
|
||||
.readdir = dcache_readdir,
|
||||
.fsync = simple_sync_file,
|
||||
//.fsync = simple_sync_file,
|
||||
};
|
||||
|
||||
const struct inode_operations fpgafs_simple_dir_inode_operations = {
|
||||
@ -98,8 +99,8 @@ static struct inode *fpgafs_new_inode(struct super_block *sb, int mode)
|
||||
return inode;
|
||||
|
||||
inode->i_mode = mode;
|
||||
inode->i_uid = current->fsuid;
|
||||
inode->i_gid = current->fsgid;
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = current_fsgid();
|
||||
inode->i_blocks = 0;
|
||||
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
|
||||
return inode;
|
||||
|
Loading…
Reference in New Issue
Block a user