staging: comedi: avoid a put_device(), get_device() sequence
authorIan Abbott <abbotti@mev.co.uk>
Mon, 15 Oct 2012 12:07:31 +0000 (13:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 19:43:37 +0000 (12:43 -0700)
commit0a7717dfe097d7a0a08e824ed39547c3e6e9d7e8
treeb9a9314a96cda75e3484d1cadc82a8e3b3cf8a12
parent7f2f7e050bea242735880b7876d9771efb580213
staging: comedi: avoid a put_device(), get_device() sequence

In `comedi_set_hw_dev()`, if there is no change to `dev->hw_dev` (and it
is not `NULL`), don't bother putting and getting the device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedidev.h