diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-29 12:05:38 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-29 12:05:38 -0700 |
| commit | 854ff7923753009189a9e1f80d23ae9d407c2fb2 (patch) | |
| tree | 6781626afbae91eb740d7eefca745b38a62330a0 /drivers/mmc/host/pxamci.c | |
| parent | fc8f5028eb0cc5aee0501a99f59a04f748fbff1c (diff) | |
| parent | c3ad4ec3fdaba1f5367dd15b5a2e6dc9a9cde3f1 (diff) | |
Merge tag 'mmc-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC updates from Ulf Hansson:
"MMC core:
- Remove redundant pm_runtime_mark_last_busy() calls
MMC host:
- Convert drivers to use devm_mmc_alloc_host()
- Remove redundant pm_runtime_mark_last_busy() calls
- renesas_sdhi:
- Add support for the RZ/T2H and RZ/N2H variants
- Fix incorrect auto retuning for an SDIO card
- rtsx_usb_sdmmc:
- Add 74 clocks in poweron flow
- Re-work the code in sd_set_power_mode()
- loongson2:
- Add driver for the Loongson-2K SD/SDIO controller
- Add support for the Loongson-2K2000 SD/SDIO/eMMC controller
- sdhci:
- Drop sdhci_free_host()/sdhci_pltfm_free() interface
- Remove the sdhci_free_host() and sdhci_pltfm_free() helpers
- sdhci-cadence: Add support for the Mobileye EyeQ controller
- sdhci-esdhc-imx:
- Optimize clock loopback selection
- Don't change pinctrl in suspend if wakeup source
- sdhci-msm:
- Add support for the Milos variant
- Add support for the qcs8300 variant
- Ensure SD card power isn't ON when card gets removed
- sdhci-of-k1: Disable HW busy detection"
* tag 'mmc-v6.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (102 commits)
mmc: loongson2: Unify the function prefixes for loongson2_mmc_pdata
mmc: loongson2: Fix error code in loongson2_mmc_resource_request()
dt-bindings: mmc: sdhci-msm: document the Milos SDHCI Controller
mmc: loongson2: prevent integer overflow in ret variable
mmc: Remove redundant pm_runtime_mark_last_busy() calls
mmc: sdhci-msm: Ensure SD card power isn't ON when card removed
dt-bindings: mmc: Add sdhci compatible for qcs8300
mmc: sdhci-cadence: use of_property_present
mmc: loongson2: Add Loongson-2K2000 SD/SDIO/eMMC controller driver
dt-bindings: mmc: loongson,ls2k0500-mmc: Add compatible for Loongson-2K2000
mmc: loongson2: Add Loongson-2K SD/SDIO controller driver
dt-bindings: mmc: Add Loongson-2K SD/SDIO/eMMC controller binding
mmc: Convert ternary operator to str_true_false() helper
dt-bindings: mmc: renesas,sdhi: Document RZ/T2H and RZ/N2H support
mmc: sdhci-cadence: add Mobileye eyeQ support
dt-bindings: mmc: cdns: add Mobileye EyeQ MMC/SDHCI controller
mmc: rtsx_usb_sdmmc: Fix clang -Wimplicit-fallthrough in sd_set_power_mode()
mmc: cb710-mmc: Convert ternary operator to str_plural() helper
mmc: rtsx_usb_sdmmc: Add 74 clocks in poweron flow
mmc: rtsx_usb_sdmmc: Re-work the code in sd_set_power_mode()
...
Diffstat (limited to 'drivers/mmc/host/pxamci.c')
| -rw-r--r-- | drivers/mmc/host/pxamci.c | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 2d0ad006913d..26d03352af63 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -615,11 +615,9 @@ static int pxamci_probe(struct platform_device *pdev) if (irq < 0) return irq; - mmc = mmc_alloc_host(sizeof(struct pxamci_host), dev); - if (!mmc) { - ret = -ENOMEM; - goto out; - } + mmc = devm_mmc_alloc_host(dev, sizeof(*host)); + if (!mmc) + return -ENOMEM; mmc->ops = &pxamci_ops; @@ -646,7 +644,7 @@ static int pxamci_probe(struct platform_device *pdev) ret = pxamci_of_init(pdev, mmc); if (ret) - goto out; + return ret; host = mmc_priv(mmc); host->mmc = mmc; @@ -655,9 +653,8 @@ static int pxamci_probe(struct platform_device *pdev) host->clk = devm_clk_get(dev, NULL); if (IS_ERR(host->clk)) { - ret = PTR_ERR(host->clk); host->clk = NULL; - goto out; + return PTR_ERR(host->clk); } host->clkrate = clk_get_rate(host->clk); @@ -670,7 +667,7 @@ static int pxamci_probe(struct platform_device *pdev) ret = pxamci_init_ocr(host); if (ret < 0) - goto out; + return ret; mmc->caps = 0; host->cmdat = 0; @@ -686,10 +683,8 @@ static int pxamci_probe(struct platform_device *pdev) host->imask = MMC_I_MASK_ALL; host->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); - if (IS_ERR(host->base)) { - ret = PTR_ERR(host->base); - goto out; - } + if (IS_ERR(host->base)) + return PTR_ERR(host->base); host->res = r; /* @@ -704,16 +699,15 @@ static int pxamci_probe(struct platform_device *pdev) ret = devm_request_irq(dev, irq, pxamci_irq, 0, DRIVER_NAME, host); if (ret) - goto out; + return ret; platform_set_drvdata(pdev, mmc); host->dma_chan_rx = dma_request_chan(dev, "rx"); if (IS_ERR(host->dma_chan_rx)) { - dev_err(dev, "unable to request rx dma channel\n"); - ret = PTR_ERR(host->dma_chan_rx); host->dma_chan_rx = NULL; - goto out; + return dev_err_probe(dev, PTR_ERR(host->dma_chan_rx), + "unable to request rx dma channel\n"); } host->dma_chan_tx = dma_request_chan(dev, "tx"); @@ -771,14 +765,10 @@ static int pxamci_probe(struct platform_device *pdev) return 0; out: - if (host) { - if (host->dma_chan_rx) - dma_release_channel(host->dma_chan_rx); - if (host->dma_chan_tx) - dma_release_channel(host->dma_chan_tx); - } - if (mmc) - mmc_free_host(mmc); + if (host->dma_chan_rx) + dma_release_channel(host->dma_chan_rx); + if (host->dma_chan_tx) + dma_release_channel(host->dma_chan_tx); return ret; } @@ -803,8 +793,6 @@ static void pxamci_remove(struct platform_device *pdev) dmaengine_terminate_all(host->dma_chan_tx); dma_release_channel(host->dma_chan_rx); dma_release_channel(host->dma_chan_tx); - - mmc_free_host(mmc); } } |
