All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource()
@ 2021-09-08  7:09 Cai Huoqing
  2021-09-08  7:09 ` [PATCH 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Cai Huoqing @ 2021-09-08  7:09 UTC (permalink / raw)
  To: caihuoqing
  Cc: Niklas Cassel, Andy Gross, Bjorn Andersson, linux-pm,
	linux-arm-msm, linux-kernel

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
 drivers/soc/qcom/cpr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/soc/qcom/cpr.c b/drivers/soc/qcom/cpr.c
index 4ce8e816154f..1d818a8ba208 100644
--- a/drivers/soc/qcom/cpr.c
+++ b/drivers/soc/qcom/cpr.c
@@ -1614,7 +1614,6 @@ static void cpr_debugfs_init(struct cpr_drv *drv)
 
 static int cpr_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	struct cpr_drv *drv;
 	int irq, ret;
@@ -1648,8 +1647,7 @@ static int cpr_probe(struct platform_device *pdev)
 	if (IS_ERR(drv->tcsr))
 		return PTR_ERR(drv->tcsr);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	drv->base = devm_ioremap_resource(dev, res);
+	drv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(drv->base))
 		return PTR_ERR(drv->base);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-08  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08  7:09 [PATCH 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:09 ` [PATCH 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-08  7:09 ` [PATCH 3/6] soc: qcom-geni-se: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08  7:09 ` [PATCH 4/6] soc: qcom_aoss: " Cai Huoqing
2021-09-08  7:09 ` [PATCH 5/6] soc: qcom_gsbi: " Cai Huoqing
2021-09-08  7:09 ` [PATCH 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-08  7:35   ` Steev Klimaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.