From: Ian Abbott Date: Fri, 8 Nov 2013 15:03:35 +0000 (+0000) Subject: staging: comedi: use refcount in comedi_driver_unregister() X-Git-Tag: v3.14-rc1~150^2~775^2~90 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a200fadca97abb337dcc28e737c1a2e11f56b714;p=pandora-kernel.git staging: comedi: use refcount in comedi_driver_unregister() Change `comedi_driver_unregister()` to call `comedi_dev_get_from_minor()` instead of `comedi_dev_from_minor()` when finding devices using the driver. This increments the reference count to prevent the device being removed while it is being checked to see if it is attached to the driver. Call `comedi_dev_put()` to decrement the reference afterwards. Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed