Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: rtsx_pci: Use devm_mmc_alloc_host() helper

Use new function devm_mmc_alloc_host() to simplify the code.

Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/f18424d5bf8b3055de7d8bcf3918868707086e85.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Binbin Zhou and committed by
Ulf Hansson
ffcf51d6 58c40f3f

+1 -4
+1 -4
drivers/mmc/host/rtsx_pci_sdmmc.c
··· 1498 1498 1499 1499 dev_dbg(&(pdev->dev), ": Realtek PCI-E SDMMC controller found\n"); 1500 1500 1501 - mmc = mmc_alloc_host(sizeof(*host), &pdev->dev); 1501 + mmc = devm_mmc_alloc_host(&pdev->dev, sizeof(*host)); 1502 1502 if (!mmc) 1503 1503 return -ENOMEM; 1504 1504 ··· 1529 1529 if (ret) { 1530 1530 pm_runtime_dont_use_autosuspend(&pdev->dev); 1531 1531 pm_runtime_disable(&pdev->dev); 1532 - mmc_free_host(mmc); 1533 1532 return ret; 1534 1533 } 1535 1534 ··· 1570 1571 1571 1572 pm_runtime_dont_use_autosuspend(&pdev->dev); 1572 1573 pm_runtime_disable(&pdev->dev); 1573 - 1574 - mmc_free_host(mmc); 1575 1574 1576 1575 dev_dbg(&(pdev->dev), 1577 1576 ": Realtek PCI-E SDMMC controller has been removed\n");