Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 965ab29b authored by Martin Kepplinger's avatar Martin Kepplinger Committed by Greg Kroah-Hartman
Browse files

char: misc: document behaviour of open()



an open syscall now assignes file->private_data to a pointer to the
miscdevice structure. This reminds driver developers not to duplicate
code if they need this.

Signed-off-by: default avatarMartin Kepplinger <martink@posteo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bfeeca1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -169,7 +169,9 @@ static const struct file_operations misc_fops = {
 *	the minor number requested is used.
 *
 *	The structure passed is linked into the kernel and may not be
 *	destroyed until it has been unregistered.
 *	destroyed until it has been unregistered. By default, an open()
 *	syscall to the device sets file->private_data to point to the
 *	structure.
 *
 *	A zero is returned on success and a negative errno code for
 *	failure.