From e5d670dcb7b336fb0c2fcff29ce87892e492e6b3 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:40 +0000 Subject: [PATCH] staging: comedi: use file->private_data in file operations Since the `struct comedi_device` should now be protected from being freed while an open file object is using it, use the `private_data` member of the `struct file` to point to it. Set it in `comedi_open()` and use it in the other file operation handlers instead of calling `comedi_dev_from_minor()` and checking the result. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed