Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5118cd2 authored by Barry Song's avatar Barry Song Committed by Grant Likely
Browse files

spi/sirf: use clk_prepare_enable and clk_disable_unprepare



Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent f305a0a8
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -569,7 +569,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
		ret = -EINVAL;
		ret = -EINVAL;
		goto free_pin;
		goto free_pin;
	}
	}
	clk_enable(sspi->clk);
	clk_prepare_enable(sspi->clk);
	sspi->ctrl_freq = clk_get_rate(sspi->clk);
	sspi->ctrl_freq = clk_get_rate(sspi->clk);


	init_completion(&sspi->done);
	init_completion(&sspi->done);
@@ -593,7 +593,7 @@ static int spi_sirfsoc_probe(struct platform_device *pdev)
	return 0;
	return 0;


free_clk:
free_clk:
	clk_disable(sspi->clk);
	clk_disable_unprepare(sspi->clk);
	clk_put(sspi->clk);
	clk_put(sspi->clk);
free_pin:
free_pin:
	pinctrl_put(sspi->p);
	pinctrl_put(sspi->p);
@@ -617,7 +617,7 @@ static int spi_sirfsoc_remove(struct platform_device *pdev)
		if (sspi->chipselect[i] > 0)
		if (sspi->chipselect[i] > 0)
			gpio_free(sspi->chipselect[i]);
			gpio_free(sspi->chipselect[i]);
	}
	}
	clk_disable(sspi->clk);
	clk_disable_unprepare(sspi->clk);
	clk_put(sspi->clk);
	clk_put(sspi->clk);
	pinctrl_put(sspi->p);
	pinctrl_put(sspi->p);
	spi_master_put(master);
	spi_master_put(master);