The write call back function allows a userland process to write data to the kernel, so it has some kind of control over the kernel. The write function should have the following format:
The write function should read count
bytes at maximum from the buffer. Note
that the buffer doesn't live in the
kernel's memory space, so it should first be copied to kernel
space with copy_from_user
. The
file parameter is usually
ignored. Section 3.3 shows how to use the
data parameter.
Again, Chapter 5 shows how to use this call back function.