hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/mmc/host/sunxi-mmc.c
....@@ -1317,8 +1317,8 @@
13171317 return ret;
13181318
13191319 host->irq = platform_get_irq(pdev, 0);
1320
- if (host->irq <= 0) {
1321
- ret = -EINVAL;
1320
+ if (host->irq < 0) {
1321
+ ret = host->irq;
13221322 goto error_disable_mmc;
13231323 }
13241324
....@@ -1459,9 +1459,11 @@
14591459 struct sunxi_mmc_host *host = mmc_priv(mmc);
14601460
14611461 mmc_remove_host(mmc);
1462
- pm_runtime_force_suspend(&pdev->dev);
1463
- disable_irq(host->irq);
1464
- sunxi_mmc_disable(host);
1462
+ pm_runtime_disable(&pdev->dev);
1463
+ if (!pm_runtime_status_suspended(&pdev->dev)) {
1464
+ disable_irq(host->irq);
1465
+ sunxi_mmc_disable(host);
1466
+ }
14651467 dma_free_coherent(&pdev->dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
14661468 mmc_free_host(mmc);
14671469