* [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()
@ 2023-08-02 9:40 Li Zetao
2023-08-03 5:37 ` Adrian Hunter
2023-08-08 10:52 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Li Zetao @ 2023-08-02 9:40 UTC (permalink / raw)
To: patrice.chotard, adrian.hunter, ulf.hansson; +Cc: linux-mmc
Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
drivers/mmc/host/sdhci-st.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
index 6415916fbd91..97f350953c4b 100644
--- a/drivers/mmc/host/sdhci-st.c
+++ b/drivers/mmc/host/sdhci-st.c
@@ -348,7 +348,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
struct clk *clk, *icnclk;
int ret = 0;
u16 host_version;
- struct resource *res;
struct reset_control *rstc;
clk = devm_clk_get(&pdev->dev, "mmc");
@@ -397,9 +396,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
}
/* Configure the FlashSS Top registers for setting eMMC TX/RX delay */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
- "top-mmc-delay");
- pdata->top_ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ pdata->top_ioaddr = devm_platform_ioremap_resource_byname(pdev, "top-mmc-delay");
if (IS_ERR(pdata->top_ioaddr))
pdata->top_ioaddr = NULL;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()
2023-08-02 9:40 [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname() Li Zetao
@ 2023-08-03 5:37 ` Adrian Hunter
2023-08-08 10:52 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2023-08-03 5:37 UTC (permalink / raw)
To: Li Zetao, patrice.chotard, ulf.hansson; +Cc: linux-mmc
On 2/08/23 12:40, Li Zetao wrote:
> Convert platform_get_resource_byname() + devm_ioremap_resource() to a
> single call to devm_platform_ioremap_resource_byname(), as this is
> exactly what this function does.
>
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-st.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index 6415916fbd91..97f350953c4b 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -348,7 +348,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
> struct clk *clk, *icnclk;
> int ret = 0;
> u16 host_version;
> - struct resource *res;
> struct reset_control *rstc;
>
> clk = devm_clk_get(&pdev->dev, "mmc");
> @@ -397,9 +396,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
> }
>
> /* Configure the FlashSS Top registers for setting eMMC TX/RX delay */
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> - "top-mmc-delay");
> - pdata->top_ioaddr = devm_ioremap_resource(&pdev->dev, res);
> + pdata->top_ioaddr = devm_platform_ioremap_resource_byname(pdev, "top-mmc-delay");
> if (IS_ERR(pdata->top_ioaddr))
> pdata->top_ioaddr = NULL;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname()
2023-08-02 9:40 [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname() Li Zetao
2023-08-03 5:37 ` Adrian Hunter
@ 2023-08-08 10:52 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2023-08-08 10:52 UTC (permalink / raw)
To: Li Zetao; +Cc: patrice.chotard, adrian.hunter, linux-mmc
On Wed, 2 Aug 2023 at 11:41, Li Zetao <lizetao1@huawei.com> wrote:
>
> Convert platform_get_resource_byname() + devm_ioremap_resource() to a
> single call to devm_platform_ioremap_resource_byname(), as this is
> exactly what this function does.
>
> Signed-off-by: Li Zetao <lizetao1@huawei.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-st.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c
> index 6415916fbd91..97f350953c4b 100644
> --- a/drivers/mmc/host/sdhci-st.c
> +++ b/drivers/mmc/host/sdhci-st.c
> @@ -348,7 +348,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
> struct clk *clk, *icnclk;
> int ret = 0;
> u16 host_version;
> - struct resource *res;
> struct reset_control *rstc;
>
> clk = devm_clk_get(&pdev->dev, "mmc");
> @@ -397,9 +396,7 @@ static int sdhci_st_probe(struct platform_device *pdev)
> }
>
> /* Configure the FlashSS Top registers for setting eMMC TX/RX delay */
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> - "top-mmc-delay");
> - pdata->top_ioaddr = devm_ioremap_resource(&pdev->dev, res);
> + pdata->top_ioaddr = devm_platform_ioremap_resource_byname(pdev, "top-mmc-delay");
> if (IS_ERR(pdata->top_ioaddr))
> pdata->top_ioaddr = NULL;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-08 17:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02 9:40 [PATCH -next] mmc: sdhci-st: Use devm_platform_ioremap_resource_byname() Li Zetao
2023-08-03 5:37 ` Adrian Hunter
2023-08-08 10:52 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox