]> git.baikalelectronics.ru Git - kernel.git/commit
can: m_can: Fix runtime resume call
authorFaiz Abbas <faiz_abbas@ti.com>
Tue, 3 Jul 2018 11:11:02 +0000 (16:41 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 23 Jul 2018 12:34:45 +0000 (14:34 +0200)
commit8d403d4aaa59d65611ebb6747443ea1ec04b9fee
tree4d147b86675b1c3b4f8a1cfd68e25109b79b0e40
parentc78954ea6d91e3118d23b80ead2ae5e9c3e7ba0d
can: m_can: Fix runtime resume call

pm_runtime_get_sync() returns a 1 if the state of the device is already
'active'. This is not a failure case and should return a success.

Therefore fix error handling for pm_runtime_get_sync() call such that
it returns success when the value is 1.

Also cleanup the TODO for using runtime PM for sleep mode as that is
implemented.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Cc: <stable@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c