Advertisement
Guest User

Untitled

a guest
Jan 10th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
  2. index c2690c1a50ff..3a9679531520 100644
  3. --- a/drivers/mmc/host/meson-gx-mmc.c
  4. +++ b/drivers/mmc/host/meson-gx-mmc.c
  5. @@ -179,6 +179,8 @@ struct meson_host {
  6. struct sd_emmc_desc *descs;
  7. dma_addr_t descs_dma_addr;
  8.  
  9. + int irq;
  10. +
  11. bool vqmmc_enabled;
  12. };
  13.  
  14. @@ -1231,7 +1233,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
  15. struct resource *res;
  16. struct meson_host *host;
  17. struct mmc_host *mmc;
  18. - int ret, irq;
  19. + int ret;
  20.  
  21. mmc = mmc_alloc_host(sizeof(struct meson_host), &pdev->dev);
  22. if (!mmc)
  23. @@ -1276,8 +1278,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
  24. goto free_host;
  25. }
  26.  
  27. - irq = platform_get_irq(pdev, 0);
  28. - if (irq <= 0) {
  29. + host->irq = platform_get_irq(pdev, 0);
  30. + if (host->irq <= 0) {
  31. dev_err(&pdev->dev, "failed to get interrupt resource.\n");
  32. ret = -EINVAL;
  33. goto free_host;
  34. @@ -1331,9 +1333,8 @@ static int meson_mmc_probe(struct platform_device *pdev)
  35. writel(IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN,
  36. host->regs + SD_EMMC_IRQ_EN);
  37.  
  38. - ret = devm_request_threaded_irq(&pdev->dev, irq, meson_mmc_irq,
  39. - meson_mmc_irq_thread, IRQF_SHARED,
  40. - NULL, host);
  41. + ret = request_threaded_irq(host->irq, meson_mmc_irq,
  42. + meson_mmc_irq_thread, IRQF_SHARED, NULL, host);
  43. if (ret)
  44. goto err_init_clk;
  45.  
  46. @@ -1387,6 +1388,7 @@ static int meson_mmc_remove(struct platform_device *pdev)
  47.  
  48. /* disable interrupts */
  49. writel(0, host->regs + SD_EMMC_IRQ_EN);
  50. + free_irq(host->irq, host);
  51.  
  52. dma_free_coherent(host->dev, SD_EMMC_DESC_BUF_LEN,
  53. host->descs, host->descs_dma_addr);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement