diff options
author | Martin Kepplinger <martink@posteo.de> | 2014-10-29 19:22:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-07 18:25:52 (GMT) |
commit | 965ab29ba09d75056a6c9b0f707cd1c2cc91188f (patch) | |
tree | 2ba69e8b06764f59e18e1ebf2606f116925e95ef /drivers | |
parent | 2bfeeca107591134bf9a40945c50d337bf858612 (diff) | |
download | linux-965ab29ba09d75056a6c9b0f707cd1c2cc91188f.tar.xz |
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: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 205ad4c..69a08a6 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -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. |