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:
parent
3cece9efb5
commit
501ef6658d
10
fpgafs.h
10
fpgafs.h
@ -40,20 +40,18 @@ struct fpgafs_lldrv {
|
|||||||
int (*init) (void);
|
int (*init) (void);
|
||||||
int (*exit) (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 (*recv) (unsigned char *buf, int len);
|
||||||
|
|
||||||
int (*read_load) (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_register_lldrv(struct fpgafs_lldrv *drv);
|
||||||
int fpgafs_unregister_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,
|
ssize_t fpgafs_send_data(struct file *file, const char __user *buf, size_t len, loff_t *pos);
|
||||||
size_t len, loff_t *pos);
|
ssize_t fpgafs_recv_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);
|
|
||||||
|
|
||||||
int fpgafs_read_load(char *buf, int len);
|
int fpgafs_read_load(char *buf, int len);
|
||||||
int fpgafs_write_load(char *buf, int len);
|
int fpgafs_write_load(char *buf, int len);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include "fpgafs.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");
|
printk("fpgafs: send data CHAM\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
static int load = 0;
|
static int load = 0;
|
||||||
static unsigned char *load_buf;
|
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");
|
printk("fpgafs: send data DEBUG\n");
|
||||||
return 0;
|
return 0;
|
||||||
@ -36,7 +36,7 @@ static int fpgafs_read_load_dbg(unsigned char *buf, int len)
|
|||||||
return 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;
|
u32 cp = 0;
|
||||||
u8 __user *usr;
|
u8 __user *usr;
|
||||||
|
2
llmgmt.c
2
llmgmt.c
@ -13,7 +13,7 @@ static struct fpgafs_lldrv *lldrv_cur;
|
|||||||
static int lldrv_count = 0x0;
|
static int lldrv_count = 0x0;
|
||||||
static DEFINE_SPINLOCK(fpgafs_lldrv_lock);
|
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)
|
size_t len, loff_t *pos)
|
||||||
{
|
{
|
||||||
return (lldrv_cur) ? lldrv_cur->send(buf, len) : -EBUSY;
|
return (lldrv_cur) ? lldrv_cur->send(buf, len) : -EBUSY;
|
||||||
|
Loading…
Reference in New Issue
Block a user