diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-07 23:27:30 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-07 23:27:30 +0400 |
commit | a3b072cd180c12e8fe0ece9487b9065808327640 (patch) | |
tree | 62b982041be84748852d77cdf6ca5639ef40858f /drivers/spi/spi-ath79.c | |
parent | 75a1ba5b2c529db60ca49626bcaf0bddf4548438 (diff) | |
parent | 081cd62a010f97b5bc1d2b0cd123c5abc692b68a (diff) | |
download | linux-a3b072cd180c12e8fe0ece9487b9065808327640.tar.xz |
Merge tag 'efi-urgent' into x86/urgent
* Avoid WARN_ON() when mapping BGRT on Baytrail (EFI 32-bit).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'drivers/spi/spi-ath79.c')
-rw-r--r-- | drivers/spi/spi-ath79.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index 821bf7ac218d..31534b51715a 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c @@ -243,21 +243,21 @@ static int ath79_spi_probe(struct platform_device *pdev) goto err_put_master; } - sp->base = ioremap(r->start, resource_size(r)); + sp->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); if (!sp->base) { ret = -ENXIO; goto err_put_master; } - sp->clk = clk_get(&pdev->dev, "ahb"); + sp->clk = devm_clk_get(&pdev->dev, "ahb"); if (IS_ERR(sp->clk)) { ret = PTR_ERR(sp->clk); - goto err_unmap; + goto err_put_master; } ret = clk_enable(sp->clk); if (ret) - goto err_clk_put; + goto err_put_master; rate = DIV_ROUND_UP(clk_get_rate(sp->clk), MHZ); if (!rate) { @@ -280,10 +280,6 @@ err_disable: ath79_spi_disable(sp); err_clk_disable: clk_disable(sp->clk); -err_clk_put: - clk_put(sp->clk); -err_unmap: - iounmap(sp->base); err_put_master: spi_master_put(sp->bitbang.master); @@ -297,8 +293,6 @@ static int ath79_spi_remove(struct platform_device *pdev) spi_bitbang_stop(&sp->bitbang); ath79_spi_disable(sp); clk_disable(sp->clk); - clk_put(sp->clk); - iounmap(sp->base); spi_master_put(sp->bitbang.master); return 0; |