修改参数名称为 position.

Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
ithink.chan 2020-04-28 15:48:32 +08:00
parent 8d435d912e
commit a52eb313f6
2 changed files with 4 additions and 4 deletions

View File

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

View File

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