Skip to content

Commit

Permalink
spi/hspi: fixup Runtime PM enable timing
Browse files Browse the repository at this point in the history
3e00a09
(spi/hspi: Convert to core runtime PM)
enabled master->auto_runtime_pm.
Then, pm_runtime_enable() is required *before*
spi_register_master() calling.
This patch fixed it up.
Kernel will hang up with "spi_master spi0: Failed to power device: -13"
message without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Oct 3, 2013
1 parent 15c03dd commit 268d764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/spi/spi-sh-hspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ static int hspi_probe(struct platform_device *pdev)
goto error1;
}

pm_runtime_enable(&pdev->dev);

master->num_chipselect = 1;
master->bus_num = pdev->id;
master->setup = hspi_setup;
Expand All @@ -309,8 +311,6 @@ static int hspi_probe(struct platform_device *pdev)
goto error1;
}

pm_runtime_enable(&pdev->dev);

return 0;

error1:
Expand Down

0 comments on commit 268d764

Please sign in to comment.