From b449c1cad7e3acf80834d4bdb1b6241d5d8dd249 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:33 +0000 Subject: [PATCH] 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-format-patch failed