Linux-ide Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource()
@ 2019-08-20 12:35 ` Enrico Weigelt, metux IT consult
  2019-08-20 12:35   ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult
                     ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/ahci_octeon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c
index 5a44e08..2280180 100644
--- a/drivers/ata/ahci_octeon.c
+++ b/drivers/ata/ahci_octeon.c
@@ -32,13 +32,11 @@ static int ahci_octeon_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct device_node *node = dev->of_node;
-	struct resource *res;
 	void __iomem *base;
 	u64 cfg;
 	int ret;
 
-	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);
 
-- 
1.9.1


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

* [PATCH 2/9] drivers: ata: ahci_seattle: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:28     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 3/9] drivers: ata: ahci_tegra: " Enrico Weigelt, metux IT consult
                     ` (7 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/ahci_seattle.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
index ced12705..2d88d36 100644
--- a/drivers/ata/ahci_seattle.c
+++ b/drivers/ata/ahci_seattle.c
@@ -132,8 +132,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
 	if (!plat_data)
 		return &ahci_port_info;
 
-	plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 1));
+	plat_data->sgpio_ctrl = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(plat_data->sgpio_ctrl))
 		return &ahci_port_info;
 
-- 
1.9.1


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

* [PATCH 3/9] drivers: ata: ahci_tegra: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
  2019-08-20 12:35   ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:44     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 4/9] drivers: ata: ahci_xgene: " Enrico Weigelt, metux IT consult
                     ` (6 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/ahci_tegra.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
index e3163da..3845c23 100644
--- a/drivers/ata/ahci_tegra.c
+++ b/drivers/ata/ahci_tegra.c
@@ -481,7 +481,6 @@ static int tegra_ahci_probe(struct platform_device *pdev)
 {
 	struct ahci_host_priv *hpriv;
 	struct tegra_ahci_priv *tegra;
-	struct resource *res;
 	int ret;
 	unsigned int i;
 
@@ -498,19 +497,17 @@ static int tegra_ahci_probe(struct platform_device *pdev)
 	tegra->pdev = pdev;
 	tegra->soc = of_device_get_match_data(&pdev->dev);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res);
+	tegra->sata_regs = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(tegra->sata_regs))
 		return PTR_ERR(tegra->sata_regs);
 
 	/*
 	 * AUX registers is optional.
 	 */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	if (res) {
-		tegra->sata_aux_regs = devm_ioremap_resource(&pdev->dev, res);
-		if (IS_ERR(tegra->sata_aux_regs))
-			return PTR_ERR(tegra->sata_aux_regs);
+	tegra->sata_aux_regs = devm_platform_ioremap_resource(pdev, 2);
+	if (IS_ERR(tegra->sata_aux_regs)) {
+		dev_info(&pdev->dev, "Cant get aux registers (optional)");
+		tegra->sata_aux_regs = NULL;
 	}
 
 	tegra->sata_rst = devm_reset_control_get(&pdev->dev, "sata");
-- 
1.9.1


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

* [PATCH 4/9] drivers: ata: ahci_xgene: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
  2019-08-20 12:35   ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult
  2019-08-20 12:35   ` [PATCH 3/9] drivers: ata: ahci_tegra: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:45     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 5/9] drivers: ata: libahci_platform: " Enrico Weigelt, metux IT consult
                     ` (5 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/ahci_xgene.c | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index 16246c8..5391f5d 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -739,7 +739,6 @@ static int xgene_ahci_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct ahci_host_priv *hpriv;
 	struct xgene_ahci_context *ctx;
-	struct resource *res;
 	const struct of_device_id *of_devid;
 	enum xgene_ahci_version version = XGENE_AHCI_V1;
 	const struct ata_port_info *ppi[] = { &xgene_ahci_v1_port_info,
@@ -759,31 +758,25 @@ static int xgene_ahci_probe(struct platform_device *pdev)
 	ctx->dev = dev;
 
 	/* Retrieve the IP core resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	ctx->csr_core = devm_ioremap_resource(dev, res);
+	ctx->csr_core = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(ctx->csr_core))
 		return PTR_ERR(ctx->csr_core);
 
 	/* Retrieve the IP diagnostic resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	ctx->csr_diag = devm_ioremap_resource(dev, res);
+	ctx->csr_diag = devm_platform_ioremap_resource(pdev, 2);
 	if (IS_ERR(ctx->csr_diag))
 		return PTR_ERR(ctx->csr_diag);
 
 	/* Retrieve the IP AXI resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
-	ctx->csr_axi = devm_ioremap_resource(dev, res);
+	ctx->csr_axi = devm_platform_ioremap_resource(pdev, 3);
 	if (IS_ERR(ctx->csr_axi))
 		return PTR_ERR(ctx->csr_axi);
 
 	/* Retrieve the optional IP mux resource */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
-	if (res) {
-		void __iomem *csr = devm_ioremap_resource(dev, res);
-		if (IS_ERR(csr))
-			return PTR_ERR(csr);
-
-		ctx->csr_mux = csr;
+	ctx->csr_mux = csr = devm_platform_ioremap_resource(pdev, 4);
+	if (IS_ERR(ctx->csr_mux)) {
+		dev_info(&pdev->dev, "cant get ip mux resource (optional)");
+		ctx->csr_mux = NULL;
 	}
 
 	of_devid = of_match_device(xgene_ahci_of_match, dev);
-- 
1.9.1


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

* [PATCH 5/9] drivers: ata: libahci_platform: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (2 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 4/9] drivers: ata: ahci_xgene: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:29     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 6/9] drivers: ata: pata_bk3710: " Enrico Weigelt, metux IT consult
                     ` (4 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/libahci_platform.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
index 9e9583a..3d84be8 100644
--- a/drivers/ata/libahci_platform.c
+++ b/drivers/ata/libahci_platform.c
@@ -408,8 +408,7 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
 
 	devres_add(dev, hpriv);
 
-	hpriv->mmio = devm_ioremap_resource(dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	hpriv->mmio = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(hpriv->mmio)) {
 		rc = PTR_ERR(hpriv->mmio);
 		goto err_out;
-- 
1.9.1


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

* [PATCH 6/9] drivers: ata: pata_bk3710: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (3 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 5/9] drivers: ata: libahci_platform: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:30     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 7/9] drivers: ata: sata_dwc_460ex: " Enrico Weigelt, metux IT consult
                     ` (3 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/pata_bk3710.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/ata/pata_bk3710.c b/drivers/ata/pata_bk3710.c
index fad95cf..92b036d 100644
--- a/drivers/ata/pata_bk3710.c
+++ b/drivers/ata/pata_bk3710.c
@@ -291,7 +291,6 @@ static void pata_bk3710_chipinit(void __iomem *base)
 static int __init pata_bk3710_probe(struct platform_device *pdev)
 {
 	struct clk *clk;
-	struct resource *mem;
 	struct ata_host *host;
 	struct ata_port *ap;
 	void __iomem *base;
@@ -310,15 +309,13 @@ static int __init pata_bk3710_probe(struct platform_device *pdev)
 	/* NOTE:  round *down* to meet minimum timings; we count in clocks */
 	ideclk_period = 1000000000UL / rate;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		pr_err(DRV_NAME ": failed to get IRQ resource\n");
 		return irq;
 	}
 
-	base = devm_ioremap_resource(&pdev->dev, mem);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
1.9.1


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

* [PATCH 7/9] drivers: ata: sata_dwc_460ex: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (4 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 6/9] drivers: ata: pata_bk3710: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:31     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 8/9] drivers: ata: sata_gemini: " Enrico Weigelt, metux IT consult
                     ` (2 subsequent siblings)
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/sata_dwc_460ex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 9dcef6a..de248fa 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -237,7 +237,6 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
 				 struct sata_dwc_device *hsdev)
 {
 	struct device_node *np = pdev->dev.of_node;
-	struct resource *res;
 
 	hsdev->dma = devm_kzalloc(&pdev->dev, sizeof(*hsdev->dma), GFP_KERNEL);
 	if (!hsdev->dma)
@@ -254,8 +253,7 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
 	}
 
 	/* Get physical SATA DMA register base address */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	hsdev->dma->regs = devm_ioremap_resource(&pdev->dev, res);
+	hsdev->dma->regs = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(hsdev->dma->regs))
 		return PTR_ERR(hsdev->dma->regs);
 
-- 
1.9.1


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

* [PATCH 8/9] drivers: ata: sata_gemini: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (5 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 7/9] drivers: ata: sata_dwc_460ex: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:20     ` Linus Walleij
  2019-08-20 13:36     ` Bartlomiej Zolnierkiewicz
  2019-08-20 12:35   ` [PATCH 9/9] drivers: ata: sata_rcar: " Enrico Weigelt, metux IT consult
  2019-08-20 13:27   ` [PATCH 1/9] drivers: ata: ahci_octeon: " Bartlomiej Zolnierkiewicz
  8 siblings, 2 replies; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/sata_gemini.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index f793564..55e2689 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -318,7 +318,6 @@ static int gemini_sata_probe(struct platform_device *pdev)
 	struct device_node *np = dev->of_node;
 	struct sata_gemini *sg;
 	struct regmap *map;
-	struct resource *res;
 	enum gemini_muxmode muxmode;
 	u32 gmode;
 	u32 gmask;
@@ -329,11 +328,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	sg->dev = dev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
-	sg->base = devm_ioremap_resource(dev, res);
+	sg->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sg->base))
 		return PTR_ERR(sg->base);
 
-- 
1.9.1


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

* [PATCH 9/9] drivers: ata: sata_rcar: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (6 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 8/9] drivers: ata: sata_gemini: " Enrico Weigelt, metux IT consult
@ 2019-08-20 12:35   ` " Enrico Weigelt, metux IT consult
  2019-08-20 13:37     ` Bartlomiej Zolnierkiewicz
  2019-08-20 13:27   ` [PATCH 1/9] drivers: ata: ahci_octeon: " Bartlomiej Zolnierkiewicz
  8 siblings, 1 reply; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-08-20 12:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/sata_rcar.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 3495e17..14ea1d6 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -886,7 +886,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct ata_host *host;
 	struct sata_rcar_priv *priv;
-	struct resource *mem;
 	int irq;
 	int ret = 0;
 
@@ -915,8 +914,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
 
 	host->private_data = priv;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(dev, mem);
+	priv->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->base)) {
 		ret = PTR_ERR(priv->base);
 		goto err_pm_put;
-- 
1.9.1


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

* Re: [PATCH 8/9] drivers: ata: sata_gemini: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 8/9] drivers: ata: sata_gemini: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:20     ` Linus Walleij
  2019-08-20 13:36     ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2019-08-20 13:20 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, Jens Axboe, Hans de Goede,
	Bartlomiej Zolnierkiewicz, linux-ide, linux-tegra

On Tue, Aug 20, 2019 at 2:35 PM Enrico Weigelt, metux IT consult
<info@metux.net> wrote:

> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource()
  2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
                     ` (7 preceding siblings ...)
  2019-08-20 12:35   ` [PATCH 9/9] drivers: ata: sata_rcar: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:27   ` " Bartlomiej Zolnierkiewicz
  8 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:27 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/ahci_octeon.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c
> index 5a44e08..2280180 100644
> --- a/drivers/ata/ahci_octeon.c
> +++ b/drivers/ata/ahci_octeon.c
> @@ -32,13 +32,11 @@ static int ahci_octeon_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	struct device_node *node = dev->of_node;
> -	struct resource *res;
>  	void __iomem *base;
>  	u64 cfg;
>  	int ret;
>  
> -	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);

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

* Re: [PATCH 2/9] drivers: ata: ahci_seattle: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:28     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:28 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/ahci_seattle.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
> index ced12705..2d88d36 100644
> --- a/drivers/ata/ahci_seattle.c
> +++ b/drivers/ata/ahci_seattle.c
> @@ -132,8 +132,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
>  	if (!plat_data)
>  		return &ahci_port_info;
>  
> -	plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
> -			      platform_get_resource(pdev, IORESOURCE_MEM, 1));
> +	plat_data->sgpio_ctrl = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(plat_data->sgpio_ctrl))
>  		return &ahci_port_info;


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

* Re: [PATCH 5/9] drivers: ata: libahci_platform: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 5/9] drivers: ata: libahci_platform: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:29     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:29 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult, linux-kernel
  Cc: axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/libahci_platform.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/ata/libahci_platform.c b/drivers/ata/libahci_platform.c
> index 9e9583a..3d84be8 100644
> --- a/drivers/ata/libahci_platform.c
> +++ b/drivers/ata/libahci_platform.c
> @@ -408,8 +408,7 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
>  
>  	devres_add(dev, hpriv);
>  
> -	hpriv->mmio = devm_ioremap_resource(dev,
> -			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
> +	hpriv->mmio = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(hpriv->mmio)) {
>  		rc = PTR_ERR(hpriv->mmio);
>  		goto err_out;

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

* Re: [PATCH 6/9] drivers: ata: pata_bk3710: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 6/9] drivers: ata: pata_bk3710: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:30     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:30 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/pata_bk3710.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/pata_bk3710.c b/drivers/ata/pata_bk3710.c
> index fad95cf..92b036d 100644
> --- a/drivers/ata/pata_bk3710.c
> +++ b/drivers/ata/pata_bk3710.c
> @@ -291,7 +291,6 @@ static void pata_bk3710_chipinit(void __iomem *base)
>  static int __init pata_bk3710_probe(struct platform_device *pdev)
>  {
>  	struct clk *clk;
> -	struct resource *mem;
>  	struct ata_host *host;
>  	struct ata_port *ap;
>  	void __iomem *base;
> @@ -310,15 +309,13 @@ static int __init pata_bk3710_probe(struct platform_device *pdev)
>  	/* NOTE:  round *down* to meet minimum timings; we count in clocks */
>  	ideclk_period = 1000000000UL / rate;
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		pr_err(DRV_NAME ": failed to get IRQ resource\n");
>  		return irq;
>  	}
>  
> -	base = devm_ioremap_resource(&pdev->dev, mem);
> +	base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);

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

* Re: [PATCH 7/9] drivers: ata: sata_dwc_460ex: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 7/9] drivers: ata: sata_dwc_460ex: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:31     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:31 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/sata_dwc_460ex.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
> index 9dcef6a..de248fa 100644
> --- a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
> @@ -237,7 +237,6 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
>  				 struct sata_dwc_device *hsdev)
>  {
>  	struct device_node *np = pdev->dev.of_node;
> -	struct resource *res;
>  
>  	hsdev->dma = devm_kzalloc(&pdev->dev, sizeof(*hsdev->dma), GFP_KERNEL);
>  	if (!hsdev->dma)
> @@ -254,8 +253,7 @@ static int sata_dwc_dma_init_old(struct platform_device *pdev,
>  	}
>  
>  	/* Get physical SATA DMA register base address */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	hsdev->dma->regs = devm_ioremap_resource(&pdev->dev, res);
> +	hsdev->dma->regs = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(hsdev->dma->regs))
>  		return PTR_ERR(hsdev->dma->regs);


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

* Re: [PATCH 8/9] drivers: ata: sata_gemini: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 8/9] drivers: ata: sata_gemini: " Enrico Weigelt, metux IT consult
  2019-08-20 13:20     ` Linus Walleij
@ 2019-08-20 13:36     ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:36 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.

It would also be worth to mention in the patch description that
on !res condition the driver will now return -EINVAL (instead of
-ENODEV) and print an error.

> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/sata_gemini.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
> index f793564..55e2689 100644
> --- a/drivers/ata/sata_gemini.c
> +++ b/drivers/ata/sata_gemini.c
> @@ -318,7 +318,6 @@ static int gemini_sata_probe(struct platform_device *pdev)
>  	struct device_node *np = dev->of_node;
>  	struct sata_gemini *sg;
>  	struct regmap *map;
> -	struct resource *res;
>  	enum gemini_muxmode muxmode;
>  	u32 gmode;
>  	u32 gmask;
> @@ -329,11 +328,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	sg->dev = dev;
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res)
> -		return -ENODEV;
> -
> -	sg->base = devm_ioremap_resource(dev, res);
> +	sg->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(sg->base))
>  		return PTR_ERR(sg->base);

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

* Re: [PATCH 9/9] drivers: ata: sata_rcar: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 9/9] drivers: ata: sata_rcar: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:37     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:37 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/ata/sata_rcar.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
> index 3495e17..14ea1d6 100644
> --- a/drivers/ata/sata_rcar.c
> +++ b/drivers/ata/sata_rcar.c
> @@ -886,7 +886,6 @@ static int sata_rcar_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct ata_host *host;
>  	struct sata_rcar_priv *priv;
> -	struct resource *mem;
>  	int irq;
>  	int ret = 0;
>  
> @@ -915,8 +914,7 @@ static int sata_rcar_probe(struct platform_device *pdev)
>  
>  	host->private_data = priv;
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	priv->base = devm_ioremap_resource(dev, mem);
> +	priv->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(priv->base)) {
>  		ret = PTR_ERR(priv->base);
>  		goto err_pm_put;

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

* Re: [PATCH 3/9] drivers: ata: ahci_tegra: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 3/9] drivers: ata: ahci_tegra: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:44     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:44 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  drivers/ata/ahci_tegra.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/ata/ahci_tegra.c b/drivers/ata/ahci_tegra.c
> index e3163da..3845c23 100644
> --- a/drivers/ata/ahci_tegra.c
> +++ b/drivers/ata/ahci_tegra.c
> @@ -481,7 +481,6 @@ static int tegra_ahci_probe(struct platform_device *pdev)
>  {
>  	struct ahci_host_priv *hpriv;
>  	struct tegra_ahci_priv *tegra;
> -	struct resource *res;
>  	int ret;
>  	unsigned int i;
>  
> @@ -498,19 +497,17 @@ static int tegra_ahci_probe(struct platform_device *pdev)
>  	tegra->pdev = pdev;
>  	tegra->soc = of_device_get_match_data(&pdev->dev);
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	tegra->sata_regs = devm_ioremap_resource(&pdev->dev, res);
> +	tegra->sata_regs = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(tegra->sata_regs))
>  		return PTR_ERR(tegra->sata_regs);
>  
>  	/*
>  	 * AUX registers is optional.
>  	 */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> -	if (res) {
> -		tegra->sata_aux_regs = devm_ioremap_resource(&pdev->dev, res);
> -		if (IS_ERR(tegra->sata_aux_regs))
> -			return PTR_ERR(tegra->sata_aux_regs);
> +	tegra->sata_aux_regs = devm_platform_ioremap_resource(pdev, 2);

This conversion is incorrect - despite the resource being optional
we will get error message from devm_[platform_]ioremap_resource()
(it always prints an error on !res condition).

> +	if (IS_ERR(tegra->sata_aux_regs)) {
> +		dev_info(&pdev->dev, "Cant get aux registers (optional)");

No need for this message.

> +		tegra->sata_aux_regs = NULL;
>  	}
>  
>  	tegra->sata_rst = devm_reset_control_get(&pdev->dev, "sata");
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* Re: [PATCH 4/9] drivers: ata: ahci_xgene: use devm_platform_ioremap_resource()
  2019-08-20 12:35   ` [PATCH 4/9] drivers: ata: ahci_xgene: " Enrico Weigelt, metux IT consult
@ 2019-08-20 13:45     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 20+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-08-20 13:45 UTC (permalink / raw)
  To: Enrico Weigelt, metux IT consult
  Cc: linux-kernel, axboe, hdegoede, linus.walleij, linux-ide, linux-tegra


On 8/20/19 2:35 PM, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  drivers/ata/ahci_xgene.c | 21 +++++++--------------
>  1 file changed, 7 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 16246c8..5391f5d 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
> @@ -739,7 +739,6 @@ static int xgene_ahci_probe(struct platform_device *pdev)
>  	struct device *dev = &pdev->dev;
>  	struct ahci_host_priv *hpriv;
>  	struct xgene_ahci_context *ctx;
> -	struct resource *res;
>  	const struct of_device_id *of_devid;
>  	enum xgene_ahci_version version = XGENE_AHCI_V1;
>  	const struct ata_port_info *ppi[] = { &xgene_ahci_v1_port_info,
> @@ -759,31 +758,25 @@ static int xgene_ahci_probe(struct platform_device *pdev)
>  	ctx->dev = dev;
>  
>  	/* Retrieve the IP core resource */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> -	ctx->csr_core = devm_ioremap_resource(dev, res);
> +	ctx->csr_core = devm_platform_ioremap_resource(pdev, 1);
>  	if (IS_ERR(ctx->csr_core))
>  		return PTR_ERR(ctx->csr_core);
>  
>  	/* Retrieve the IP diagnostic resource */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> -	ctx->csr_diag = devm_ioremap_resource(dev, res);
> +	ctx->csr_diag = devm_platform_ioremap_resource(pdev, 2);
>  	if (IS_ERR(ctx->csr_diag))
>  		return PTR_ERR(ctx->csr_diag);
>  
>  	/* Retrieve the IP AXI resource */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> -	ctx->csr_axi = devm_ioremap_resource(dev, res);
> +	ctx->csr_axi = devm_platform_ioremap_resource(pdev, 3);
>  	if (IS_ERR(ctx->csr_axi))
>  		return PTR_ERR(ctx->csr_axi);
>  
>  	/* Retrieve the optional IP mux resource */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
> -	if (res) {
> -		void __iomem *csr = devm_ioremap_resource(dev, res);
> -		if (IS_ERR(csr))
> -			return PTR_ERR(csr);
> -
> -		ctx->csr_mux = csr;
> +	ctx->csr_mux = csr = devm_platform_ioremap_resource(pdev, 4);

This conversion is incorrect - despite the resource being optional
we will get error message from devm_[platform_]ioremap_resource()
(it always prints an error on !res condition).

> +	if (IS_ERR(ctx->csr_mux)) {
> +		dev_info(&pdev->dev, "cant get ip mux resource (optional)");

No need for this message.

> +		ctx->csr_mux = NULL;
>  	}
>  
>  	of_devid = of_match_device(xgene_ahci_of_match, dev);

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

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

* [PATCH 2/9] drivers: ata: ahci_seattle: use devm_platform_ioremap_resource()
  2019-03-12  9:19 Enrico Weigelt, metux IT consult
@ 2019-03-12  9:19 ` " Enrico Weigelt, metux IT consult
  0 siblings, 0 replies; 20+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-03-12  9:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: axboe, hdegoede, b.zolnierkie, linus.walleij, linux-ide, linux-tegra

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 drivers/ata/ahci_seattle.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c
index e57b6f9..9a10d81 100644
--- a/drivers/ata/ahci_seattle.c
+++ b/drivers/ata/ahci_seattle.c
@@ -140,8 +140,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info(
 	if (!plat_data)
 		return &ahci_port_info;
 
-	plat_data->sgpio_ctrl = devm_ioremap_resource(dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 1));
+	plat_data->sgpio_ctrl = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(plat_data->sgpio_ctrl))
 		return &ahci_port_info;
 
-- 
1.9.1

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

end of thread, back to index

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190820123558epcas1p1d3ad88d04bd6694ab47eb485bd269cc4@epcas1p1.samsung.com>
2019-08-20 12:35 ` [PATCH 1/9] drivers: ata: ahci_octeon: use devm_platform_ioremap_resource() Enrico Weigelt, metux IT consult
2019-08-20 12:35   ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult
2019-08-20 13:28     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 3/9] drivers: ata: ahci_tegra: " Enrico Weigelt, metux IT consult
2019-08-20 13:44     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 4/9] drivers: ata: ahci_xgene: " Enrico Weigelt, metux IT consult
2019-08-20 13:45     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 5/9] drivers: ata: libahci_platform: " Enrico Weigelt, metux IT consult
2019-08-20 13:29     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 6/9] drivers: ata: pata_bk3710: " Enrico Weigelt, metux IT consult
2019-08-20 13:30     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 7/9] drivers: ata: sata_dwc_460ex: " Enrico Weigelt, metux IT consult
2019-08-20 13:31     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 8/9] drivers: ata: sata_gemini: " Enrico Weigelt, metux IT consult
2019-08-20 13:20     ` Linus Walleij
2019-08-20 13:36     ` Bartlomiej Zolnierkiewicz
2019-08-20 12:35   ` [PATCH 9/9] drivers: ata: sata_rcar: " Enrico Weigelt, metux IT consult
2019-08-20 13:37     ` Bartlomiej Zolnierkiewicz
2019-08-20 13:27   ` [PATCH 1/9] drivers: ata: ahci_octeon: " Bartlomiej Zolnierkiewicz
2019-03-12  9:19 Enrico Weigelt, metux IT consult
2019-03-12  9:19 ` [PATCH 2/9] drivers: ata: ahci_seattle: " Enrico Weigelt, metux IT consult

Linux-ide Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ide/0 linux-ide/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ide linux-ide/ https://lore.kernel.org/linux-ide \
		linux-ide@vger.kernel.org linux-ide@archiver.kernel.org
	public-inbox-index linux-ide


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ide


AGPL code for this site: git clone https://public-inbox.org/ public-inbox