update code. now compiles on 2.6.35.

This commit is contained in:
Benjamin Krill 2011-03-23 11:55:48 +00:00
parent 04660bc897
commit 9245824a65
4 changed files with 7 additions and 4 deletions

View File

@ -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"

View File

@ -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))

View File

@ -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;

View File

@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include "fpgafs.h"
#define FPGAFS_MAX_LLDRV 3