Bluetooth: hci_bcm: Fix unbalanced pm_runtime_disable()
authorLukas Wunner <lukas@wunner.de>
Wed, 10 Jan 2018 15:32:10 +0000 (16:32 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 10 Jan 2018 18:00:13 +0000 (19:00 +0100)
commitf4cf6b7e3b8704d3dabfb8427a61d4c03ce48d80
treeaf0a95a5ff1685af2caccf62d5ab27f895c56ede
parent54ba69f9e7304e15e07713b4bb0eb1a405d271f0
Bluetooth: hci_bcm: Fix unbalanced pm_runtime_disable()

On ->setup, pm_runtime_enable() is only called if a valid IRQ was found,
but on ->close(), pm_runtime_disable() is called unconditionally.
Disablement of runtime PM is recorded in a counter, so every
pm_runtime_disable() needs to be balanced.  Fix it.

Cc: Frédéric Danis <frederic.danis.oss@gmail.com>
Reported-and-reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c