lkml.org 
[lkml]   [2014]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] char: documentation: more useful information about misc device
Date
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


\
 
 \ /
  Last update: 2014-10-09 19:21    [W:0.087 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site