From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:33 +0000 (+0000) Subject: staging: comedi: add comedi_dev_get_from_minor() X-Git-Tag: v3.14-rc1~150^2~775^2~92 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b449c1cad7e3acf80834d4bdb1b6241d5d8dd249;p=pandora-kernel.git staging: comedi: add comedi_dev_get_from_minor() Add function `struct comedi_device *comedi_dev_get_from_minor(unsigned minor)`. This behaves like the existing `comedi_dev_from_minor()` except that it also increments the `struct kref refcount` member (via new helper function `comedi_dev_get()`) to prevent it being freed. If it returns a valid pointer, the caller is responsible for calling `comedi_dev_put()` to decrement the reference count. Export `comedi_dev_get_from_minor()` and `comedi_dev_put()` as they will be used by the "kcomedilib" module in addition to the "comedi" module itself. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed