Messages in this thread Patch in this message | | | From | Martin Kepplinger <> | Subject | [PATCH] char: documentation: more useful information about misc device | Date | Thu, 9 Oct 2014 18:37:35 +0200 |
| |
This might prevent code duplication in the future.
Signed-off-by: Martin Kepplinger <martink@posteo.de> --- This is a suggestion for a place to put this information. I think this makes sense but there might be a more appropriate place elsewhere.
drivers/char/misc.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index ffa97d2..6a3d15b 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -171,6 +171,10 @@ static const struct file_operations misc_fops = { * The structure passed is linked into the kernel and may not be * destroyed until it has been unregistered. * + * If struct miscdevice's fops contain an implementation of open() + * the struct file's private data will be a pointer back to + * struct miscdevice. + * * A zero is returned on success and a negative errno code for * failure. */ -- 1.7.10.4
| |