* [PATCH] spi: use devm_platform_get_and_ioremap_resource()
@ 2022-11-22 1:44 ye.xingchen
2022-11-22 12:24 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: ye.xingchen @ 2022-11-22 1:44 UTC (permalink / raw)
To: agross
Cc: andersson, konrad.dybcio, broonie, linux-arm-msm, linux-spi,
linux-kernel, chi.minghao
From: Minghao Chi <chi.minghao@zte.com.cn>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
drivers/spi/spi-qup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 678dc51ef017..71fc65e094e7 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -1003,8 +1003,7 @@ static int spi_qup_probe(struct platform_device *pdev)
int ret, irq, size;
dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spi: use devm_platform_get_and_ioremap_resource()
2022-11-22 1:44 [PATCH] spi: use devm_platform_get_and_ioremap_resource() ye.xingchen
@ 2022-11-22 12:24 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-11-22 12:24 UTC (permalink / raw)
To: ye.xingchen@zte.com.cn
Cc: agross, andersson, konrad.dybcio, linux-arm-msm, linux-spi,
linux-kernel, chi.minghao
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
On Tue, Nov 22, 2022 at 09:44:12AM +0800, ye.xingchen@zte.com.cn wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
This doesn't apply against current code, please check and resend:
Applying: spi: use devm_platform_get_and_ioremap_resource()
error: corrupt patch at line 19
error: could not build fake ancestor
Patch failed at 0001 spi: use devm_platform_get_and_ioremap_resource()
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 12:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 1:44 [PATCH] spi: use devm_platform_get_and_ioremap_resource() ye.xingchen
2022-11-22 12:24 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox