fix some incompatible pointers

git-svn-id: svn+ssh://en.codiert.org/home/staff/ben/dev/misc.svn/projects/fpgafs@358 766a2236-cff9-0310-b0c0-a81a5f92509a
This commit is contained in:
ben 2007-07-09 16:29:32 +00:00
parent 3cece9efb5
commit 501ef6658d
4 changed files with 9 additions and 11 deletions

View File

@ -40,20 +40,18 @@ struct fpgafs_lldrv {
int (*init) (void);
int (*exit) (void);
int (*send) (unsigned char *buf, int len);
int (*send) (const char __user *buf, int len);
int (*recv) (unsigned char *buf, int len);
int (*read_load) (unsigned char *buf, int len);
int (*write_load) (unsigned char *buf, int len);
int (*write_load) (const char __user *buf, int len);
};
int fpgafs_register_lldrv(struct fpgafs_lldrv *drv);
int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv);
static ssize_t fpgafs_send_data(struct file *file, char __user *buf,
size_t len, loff_t *pos);
static ssize_t fpgafs_recv_data(struct file *file, char __user *buf,
size_t len, loff_t *pos);
ssize_t fpgafs_send_data(struct file *file, const char __user *buf, size_t len, loff_t *pos);
ssize_t fpgafs_recv_data(struct file *file, char __user *buf, size_t len, loff_t *pos);
int fpgafs_read_load(char *buf, int len);
int fpgafs_write_load(char *buf, int len);

View File

@ -6,7 +6,7 @@
#include <linux/init.h>
#include "fpgafs.h"
static int fpgafs_send_data_cham(unsigned char *buf, int len)
static int fpgafs_send_data_cham(const char __user *buf, int len)
{
printk("fpgafs: send data CHAM\n");
return 0;

View File

@ -11,7 +11,7 @@
static int load = 0;
static unsigned char *load_buf;
static int fpgafs_send_data_dbg(unsigned char *buf, int len)
static int fpgafs_send_data_dbg(const char __user *buf, int len)
{
printk("fpgafs: send data DEBUG\n");
return 0;
@ -36,7 +36,7 @@ static int fpgafs_read_load_dbg(unsigned char *buf, int len)
return len;
}
static int fpgafs_write_load_dbg(unsigned char *buf, int len)
static int fpgafs_write_load_dbg(const char __user *buf, int len)
{
u32 cp = 0;
u8 __user *usr;

View File

@ -13,7 +13,7 @@ static struct fpgafs_lldrv *lldrv_cur;
static int lldrv_count = 0x0;
static DEFINE_SPINLOCK(fpgafs_lldrv_lock);
ssize_t fpgafs_send_data(struct file *file, char __user *buf,
ssize_t fpgafs_send_data(struct file *file, const char __user *buf,
size_t len, loff_t *pos)
{
return (lldrv_cur) ? lldrv_cur->send(buf, len) : -EBUSY;