修改参数名称为 position.
Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
parent
8d435d912e
commit
a52eb313f6
|
@ -57,13 +57,13 @@ static loff_t demo_llseek(struct file *filp, loff_t offset, int origin)
|
||||||
return filp->f_pos;
|
return filp->f_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t demo_read(struct file *filp, char __user *buffer, size_t count, loff_t *offset)
|
static ssize_t demo_read(struct file *filp, char __user *buffer, size_t count, loff_t *position)
|
||||||
{
|
{
|
||||||
const char __user *p = buffer;
|
const char __user *p = buffer;
|
||||||
return p-buffer;
|
return p-buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t demo_write(struct file *filp, const char __user *buffer, size_t count, loff_t *offset)
|
static ssize_t demo_write(struct file *filp, const char __user *buffer, size_t count, loff_t *position)
|
||||||
{
|
{
|
||||||
const char __user *p = buffer;
|
const char __user *p = buffer;
|
||||||
return p-buffer;
|
return p-buffer;
|
||||||
|
|
|
@ -57,13 +57,13 @@ static loff_t demo_llseek(struct file *filp, loff_t offset, int origin)
|
||||||
return filp->f_pos;
|
return filp->f_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t demo_read(struct file *filp, char __user *buffer, size_t count, loff_t *offset)
|
static ssize_t demo_read(struct file *filp, char __user *buffer, size_t count, loff_t *position)
|
||||||
{
|
{
|
||||||
const char __user *p = buffer;
|
const char __user *p = buffer;
|
||||||
return p-buffer;
|
return p-buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t demo_write(struct file *filp, const char __user *buffer, size_t count, loff_t *offset)
|
static ssize_t demo_write(struct file *filp, const char __user *buffer, size_t count, loff_t *position)
|
||||||
{
|
{
|
||||||
const char __user *p = buffer;
|
const char __user *p = buffer;
|
||||||
return p-buffer;
|
return p-buffer;
|
||||||
|
|
Loading…
Reference in New Issue