]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: comedi: add detachment counter for validity checks
authorIan Abbott <abbotti@mev.co.uk>
Fri, 8 Nov 2013 15:03:29 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2013 00:16:44 +0000 (16:16 -0800)
commitef77c0b2570623f1d72527cb1c6c3f3d3c59793e
treebb6222077014fb9a924e2fdc4a6ac15a9d3205d5
parentd19db51a0eeb659cd924a9d08b20a2ed4ee46b15
staging: comedi: add detachment counter for validity checks

Add a member `detach_count` to `struct comedi_device` that is
incremented every time the device gets detached.  This will be used in
some validity checks in the 'read' and 'write' file operations to make
sure the attachment remains valid.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers.c