Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Documentation/teaching/labs/device_drivers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ my_device_data:
//...
}

static int my_read(struct file *file, char __user *user_buffer, size_t size, loff_t *offset)
static ssize_t my_read(struct file *file, char __user *user_buffer, size_t size, loff_t *offset)
{
struct my_device_data *my_data;

Expand Down Expand Up @@ -525,7 +525,7 @@ into account the internal buffer size, user buffer size and the offset:

.. code-block:: c

static int my_read(struct file *file, char __user *user_buffer,
static ssize_t my_read(struct file *file, char __user *user_buffer,
size_t size, loff_t *offset)
{
struct my_device_data *my_data = (struct my_device_data *) file->private_data;
Expand Down Expand Up @@ -565,7 +565,7 @@ The structure of the write function is similar:

.. code-block:: c

static int my_write(struct file *file, const char __user *user_buffer,
static ssize_t my_write(struct file *file, const char __user *user_buffer,
size_t size, loff_t * offset)
{
struct my_device_data *my_data = (struct my_device_data *) file->private_data;
Expand Down