mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
f6ce5cca74
commit
cdb32706f6
2 changed files with 5 additions and 1 deletions
|
|
@ -339,6 +339,10 @@ Use this function to register your device driver on a parallel port
|
|||
('port'). Once you have done that, you will be able to use
|
||||
parport_claim and parport_release in order to use the port.
|
||||
|
||||
The ('name') argument is the name of the device that appears in /proc
|
||||
filesystem. The string must be valid for the whole lifetime of the
|
||||
device (until parport_unregister_device is called).
|
||||
|
||||
This function will register three callbacks into your driver:
|
||||
'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to
|
||||
indicate that you do not want a callback.
|
||||
|
|
|
|||
Loading…
Reference in a new issue