From: tomaspaukrt@email.cz Date: Wed, 25 Sep 2019 10:08:44 +0000 (+0200) Subject: spi: orion: fix runtime PM initialization X-Git-Tag: v5.5-rc3~39^2~91^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6b04e47b73f2a0d2c330cecca99f8e2cb8f85b34;p=linux.git 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 Link: https://lore.kernel.org/r/E2A.ZWgn.6sH16TohXKE.1TYpoi@seznam.cz Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 6643ccdc2508..81c991c4ddbf 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -772,9 +772,6 @@ static int orion_spi_probe(struct platform_device *pdev) if (status < 0) goto out_rel_pm; - pm_runtime_mark_last_busy(&pdev->dev); - pm_runtime_put_autosuspend(&pdev->dev); - master->dev.of_node = pdev->dev.of_node; status = spi_register_master(master); if (status < 0)