aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>2007-11-22 15:26:01 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-26 22:39:01 -0500
commitcdb32706f6948238ed6d1d85473c64c27366e9e9 (patch)
treebc8b267a0b861bbafae9c384cf80a03e14db8bbd /Documentation
parentf6ce5cca74b8681fdf1d7307edc66a7213b43f6f (diff)
plip: fix parport_register_device name parameter
Plip passes a string "name" that is allocated on stack to parport_register_device. parport_register_device holds the pointer to "name" and when the registering function exits, it points nowhere. On some machine, this bug causes bad names to appear in /proc, such as /proc/sys/dev/parport/parport0/devices/T^/�X^/�, on others, the plip proc node is completely missing. The patch also fixes documentation to note this requirement. Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/parport-lowlevel.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/parport-lowlevel.txt b/Documentation/parport-lowlevel.txt
index 265fcdcb8e5f..120eb20dbb09 100644
--- a/Documentation/parport-lowlevel.txt
+++ b/Documentation/parport-lowlevel.txt
@@ -339,6 +339,10 @@ Use this function to register your device driver on a parallel port
339('port'). Once you have done that, you will be able to use 339('port'). Once you have done that, you will be able to use
340parport_claim and parport_release in order to use the port. 340parport_claim and parport_release in order to use the port.
341 341
342The ('name') argument is the name of the device that appears in /proc
343filesystem. The string must be valid for the whole lifetime of the
344device (until parport_unregister_device is called).
345
342This function will register three callbacks into your driver: 346This function will register three callbacks into your driver:
343'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to 347'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to
344indicate that you do not want a callback. 348indicate that you do not want a callback.