OSDN Git Service

spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate().
authorStefan Potyra <Stefan.Potyra@elektrobit.com>
Thu, 26 Apr 2018 07:28:02 +0000 (09:28 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 26 Apr 2018 11:41:22 +0000 (12:41 +0100)
commit0d7412ed1f5dc0858eb4f29650a8c9c5cce8b285
treed075e8c26ade988fe75d33ff9528c4ac724feae1
parentb6a4b39152b574af8e4264292fe8fa5368fa1d74
spi/bcm63xx-hspi: Enable the clock before calling clk_get_rate().

Enable the clock prior to calling clk_get_rate(), because clk_get_rate()
should only be called if the clock is enabled.

Additionally, prepare/enable the pll_clk before calling clk_get_rate()
for the same reason.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 142168eba9dc ("spi: bcm63xx-hsspi: add bcm63xx HSSPI driver")
Signed-off-by: Stefan Potyra <Stefan.Potyra@elektrobit.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-bcm63xx-hsspi.c