From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:34 +0000 (+0000) Subject: staging: comedi: increment reference while file open X-Git-Tag: v3.14-rc1~150^2~775^2~91 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc406986d4115dfbd5e2ea8a0e96920e97162689;p=pandora-kernel.git staging: comedi: increment reference while file open In the 'open' file operation handler `comedi_open()` in "comedi_fops.c", call `comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()` to get the pointer to the `struct comedi_device`. This increments the reference to prevent it being freed. Call `comedi_dev_put()` to decrement the reference on failure, and also call it from the 'release' file operation handler `comedi_close()`. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed