* [PATCH v3 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname()
2021-09-08 8:02 [PATCH v3 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-08 8:02 ` Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 3/6] soc: qcom-geni-se: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-08 8:02 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_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
v1->v2: [PATCH 6/6] Fix typo 'dri_id'->'drv_id'
v2->v3: Just send it as a series
drivers/soc/qcom/ocmem.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index f1875dc31ae2..d2dacbbaafbd 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -300,7 +300,6 @@ static int ocmem_dev_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
unsigned long reg, region_size;
int i, j, ret, num_banks;
- struct resource *res;
struct ocmem *ocmem;
if (!qcom_scm_is_available())
@@ -321,8 +320,7 @@ static int ocmem_dev_probe(struct platform_device *pdev)
return ret;
}
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl");
- ocmem->mmio = devm_ioremap_resource(&pdev->dev, res);
+ ocmem->mmio = devm_platform_ioremap_resource_byname(pdev, "ctrl");
if (IS_ERR(ocmem->mmio)) {
dev_err(&pdev->dev, "Failed to ioremap ocmem_ctrl resource\n");
return PTR_ERR(ocmem->mmio);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/6] soc: qcom-geni-se: Make use of the helper function devm_platform_ioremap_resource()
2021-09-08 8:02 [PATCH v3 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
@ 2021-09-08 8:02 ` Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 4/6] soc: qcom_aoss: " Cai Huoqing
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-08 8:02 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>
---
v1->v2: [PATCH 6/6] Fix typo 'dri_id'->'drv_id'
v2->v3: Just send it as a series
drivers/soc/qcom/qcom-geni-se.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 7d649d2cf31e..28a8c0dda66c 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -871,7 +871,6 @@ EXPORT_SYMBOL(geni_icc_disable);
static int geni_se_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct geni_wrapper *wrapper;
int ret;
@@ -880,8 +879,7 @@ static int geni_se_probe(struct platform_device *pdev)
return -ENOMEM;
wrapper->dev = dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- wrapper->base = devm_ioremap_resource(dev, res);
+ wrapper->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wrapper->base))
return PTR_ERR(wrapper->base);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 4/6] soc: qcom_aoss: Make use of the helper function devm_platform_ioremap_resource()
2021-09-08 8:02 [PATCH v3 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 2/6] soc: qcom: ocmem: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 3/6] soc: qcom-geni-se: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
@ 2021-09-08 8:02 ` Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 5/6] soc: qcom_gsbi: " Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
4 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-08 8:02 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>
---
v1->v2: [PATCH 6/6] Fix typo 'dri_id'->'drv_id'
v2->v3: Just send it as a series
drivers/soc/qcom/qcom_aoss.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/qcom_aoss.c b/drivers/soc/qcom/qcom_aoss.c
index 536c3e4114fb..c42b80ee3920 100644
--- a/drivers/soc/qcom/qcom_aoss.c
+++ b/drivers/soc/qcom/qcom_aoss.c
@@ -521,7 +521,6 @@ static void qmp_cooling_devices_remove(struct qmp *qmp)
static int qmp_probe(struct platform_device *pdev)
{
- struct resource *res;
struct qmp *qmp;
int irq;
int ret;
@@ -534,8 +533,7 @@ static int qmp_probe(struct platform_device *pdev)
init_waitqueue_head(&qmp->event);
mutex_init(&qmp->tx_lock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- qmp->msgram = devm_ioremap_resource(&pdev->dev, res);
+ qmp->msgram = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(qmp->msgram))
return PTR_ERR(qmp->msgram);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 5/6] soc: qcom_gsbi: Make use of the helper function devm_platform_ioremap_resource()
2021-09-08 8:02 [PATCH v3 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
` (2 preceding siblings ...)
2021-09-08 8:02 ` [PATCH v3 4/6] soc: qcom_aoss: " Cai Huoqing
@ 2021-09-08 8:02 ` Cai Huoqing
2021-09-08 8:02 ` [PATCH v3 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname() Cai Huoqing
4 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-08 8:02 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>
---
v1->v2: [PATCH 6/6] Fix typo 'dri_id'->'drv_id'
v2->v3: Just send it as a series
drivers/soc/qcom/qcom_gsbi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/qcom_gsbi.c b/drivers/soc/qcom/qcom_gsbi.c
index 304afc223a58..290bdefbf28a 100644
--- a/drivers/soc/qcom/qcom_gsbi.c
+++ b/drivers/soc/qcom/qcom_gsbi.c
@@ -127,7 +127,6 @@ static int gsbi_probe(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node;
struct device_node *tcsr_node;
const struct of_device_id *match;
- struct resource *res;
void __iomem *base;
struct gsbi_info *gsbi;
int i, ret;
@@ -139,8 +138,7 @@ static int gsbi_probe(struct platform_device *pdev)
if (!gsbi)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname()
2021-09-08 8:02 [PATCH v3 1/6] PM: AVS: qcom-cpr: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
` (3 preceding siblings ...)
2021-09-08 8:02 ` [PATCH v3 5/6] soc: qcom_gsbi: " Cai Huoqing
@ 2021-09-08 8:02 ` Cai Huoqing
4 siblings, 0 replies; 6+ messages in thread
From: Cai Huoqing @ 2021-09-08 8:02 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_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
---
v1->v2: [PATCH 6/6] Fix typo 'dri_id'->'drv_id'
v2->v3: Just send it as a series
drivers/soc/qcom/rpmh-rsc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index e749a2b285d8..2834c6efc16b 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -910,7 +910,6 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
{
struct device_node *dn = pdev->dev.of_node;
struct rsc_drv *drv;
- struct resource *res;
char drv_id[10] = {0};
int ret, irq;
u32 solver_config;
@@ -941,8 +940,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev)
drv->name = dev_name(&pdev->dev);
snprintf(drv_id, ARRAY_SIZE(drv_id), "drv-%d", drv->id);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, drv_id);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource_byname(pdev, drv_id);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread