OSDN Git Service

spi: orion: fix runtime PM initialization
authortomaspaukrt@email.cz <tomaspaukrt@email.cz>
Wed, 25 Sep 2019 10:08:44 +0000 (12:08 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 26 Sep 2019 15:23:21 +0000 (08:23 -0700)
commit6b04e47b73f2a0d2c330cecca99f8e2cb8f85b34
tree71d84bba141cb9beb23c94665a38043b38636f75
parent9f918a728cf86b2757b6a7025e1f46824bfe3155
spi: orion: fix runtime PM initialization

The current initialisation of runtime PM in the orion-spi.c driver is
incorrect, because calling pm_runtime_put_autosuspend before calling
pm_runtime_get leads to a negative value of the reference count and
therefore it sometimes causes suspend during a transmission.

Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Link: https://lore.kernel.org/r/E2A.ZWgn.6sH16TohXKE.1TYpoi@seznam.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-orion.c