Subject: [PATCH 01/42] drivers: gpio: 74xx-mmio: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-74xx-mmio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-74xx-mmio.c b/drivers/gpio/gpio-74xx-mmio.c
index 49616ec..0424707 100644
--- a/drivers/gpio/gpio-74xx-mmio.c
+++ b/drivers/gpio/gpio-74xx-mmio.c
@@ -106,7 +106,6 @@ static int mmio_74xx_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
static int mmio_74xx_gpio_probe(struct platform_device *pdev)
{
struct mmio_74xx_gpio_priv *priv;
- struct resource *res;
void __iomem *dat;
int err;

@@ -116,8 +115,7 @@ static int mmio_74xx_gpio_probe(struct platform_device *pdev)

priv->flags = (uintptr_t)of_device_get_match_data(&pdev->dev);

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dat = devm_ioremap_resource(&pdev->dev, res);
+ dat = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dat))
return PTR_ERR(dat);

--
1.9.1



Subject: [PATCH 06/42] drivers: gpio: cadence: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-cadence.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-cadence.c b/drivers/gpio/gpio-cadence.c
index aec8d5d..712ae21 100644
--- a/drivers/gpio/gpio-cadence.c
+++ b/drivers/gpio/gpio-cadence.c
@@ -148,7 +148,6 @@ static void cdns_gpio_irq_handler(struct irq_desc *desc)
static int cdns_gpio_probe(struct platform_device *pdev)
{
struct cdns_gpio_chip *cgpio;
- struct resource *res;
int ret, irq;
u32 dir_prev;
u32 num_gpios = 32;
@@ -157,8 +156,7 @@ static int cdns_gpio_probe(struct platform_device *pdev)
if (!cgpio)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- cgpio->regs = devm_ioremap_resource(&pdev->dev, res);
+ cgpio->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(cgpio->regs))
return PTR_ERR(cgpio->regs);

--
1.9.1


Subject: [PATCH 12/42] drivers: gpio: grgpio: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-grgpio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
index 45b8d6a..09d3dac 100644
--- a/drivers/gpio/gpio-grgpio.c
+++ b/drivers/gpio/gpio-grgpio.c
@@ -333,7 +333,6 @@ static int grgpio_probe(struct platform_device *ofdev)
void __iomem *regs;
struct gpio_chip *gc;
struct grgpio_priv *priv;
- struct resource *res;
int err;
u32 prop;
s32 *irqmap;
@@ -344,8 +343,7 @@ static int grgpio_probe(struct platform_device *ofdev)
if (!priv)
return -ENOMEM;

- res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(&ofdev->dev, res);
+ regs = devm_platform_ioremap_resource(&ofdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);

--
1.9.1


Subject: [PATCH 26/42] drivers: gpio: rcar: pendantic formatting

a tab sneaked in, where it shouldn't be.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
drivers/gpio/gpio-rcar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index 500a359..df4419e 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -490,7 +490,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
irq_chip->irq_unmask = gpio_rcar_irq_enable;
irq_chip->irq_set_type = gpio_rcar_irq_set_type;
irq_chip->irq_set_wake = gpio_rcar_irq_set_wake;
- irq_chip->flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_MASK_ON_SUSPEND;
+ irq_chip->flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_MASK_ON_SUSPEND;

ret = gpiochip_add_data(gpio_chip, p);
if (ret) {
--
1.9.1


Subject: [PATCH 38/42] drivers: gpio: vr41xx: use devm_platform_ioremap_resource()

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

this driver deserves a bit more cleanup, to get rid of the global
variable giu_base, which makes it single-instance-only.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
drivers/gpio/gpio-vr41xx.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
index b13a49c..98cd715 100644
--- a/drivers/gpio/gpio-vr41xx.c
+++ b/drivers/gpio/gpio-vr41xx.c
@@ -467,10 +467,9 @@ static int vr41xx_gpio_to_irq(struct gpio_chip *chip, unsigned offset)

static int giu_probe(struct platform_device *pdev)
{
- struct resource *res;
unsigned int trigger, i, pin;
struct irq_chip *chip;
- int irq, ret;
+ int irq;

switch (pdev->id) {
case GPIO_50PINS_PULLUPDOWN:
@@ -489,21 +488,14 @@ static int giu_probe(struct platform_device *pdev)
return -ENODEV;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EBUSY;
-
- giu_base = ioremap(res->start, resource_size(res));
- if (!giu_base)
- return -ENOMEM;
+ giu_base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(giu_base))
+ return PTR_ERR(giu_base);

vr41xx_gpio_chip.parent = &pdev->dev;

- ret = gpiochip_add_data(&vr41xx_gpio_chip, NULL);
- if (!ret) {
- iounmap(giu_base);
+ if (gpiochip_add_data(&vr41xx_gpio_chip, NULL))
return -ENODEV;
- }

giu_write(GIUINTENL, 0);
giu_write(GIUINTENH, 0);
@@ -534,7 +526,6 @@ static int giu_probe(struct platform_device *pdev)
static int giu_remove(struct platform_device *pdev)
{
if (giu_base) {
- iounmap(giu_base);
giu_base = NULL;
}

--
1.9.1


Subject: [PATCH 42/42] drivers: gpio: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-zynq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 00ff7b1..9392eda 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -834,7 +834,6 @@ static int zynq_gpio_probe(struct platform_device *pdev)
int ret, bank_num;
struct zynq_gpio *gpio;
struct gpio_chip *chip;
- struct resource *res;
const struct of_device_id *match;

gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
@@ -849,8 +848,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
gpio->p_data = match->data;
platform_set_drvdata(pdev, gpio);

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpio->base_addr = devm_ioremap_resource(&pdev->dev, res);
+ gpio->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio->base_addr))
return PTR_ERR(gpio->base_addr);

--
1.9.1


Subject: [PATCH 36/42] drivers: gpio: uniphier: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-uniphier.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
index 0f662b2..93cdcc4 100644
--- a/drivers/gpio/gpio-uniphier.c
+++ b/drivers/gpio/gpio-uniphier.c
@@ -346,7 +346,6 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
struct uniphier_gpio_priv *priv;
struct gpio_chip *chip;
struct irq_chip *irq_chip;
- struct resource *regs;
unsigned int nregs;
u32 ngpios;
int ret;
@@ -370,8 +369,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;

- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- priv->regs = devm_ioremap_resource(dev, regs);
+ priv->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(priv->regs))
return PTR_ERR(priv->regs);

--
1.9.1


Subject: [PATCH 41/42] drivers: gpio: xlp: devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-xlp.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-xlp.c b/drivers/gpio/gpio-xlp.c
index 0a3607f..54d3359 100644
--- a/drivers/gpio/gpio-xlp.c
+++ b/drivers/gpio/gpio-xlp.c
@@ -290,22 +290,17 @@ static void xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state)
static int xlp_gpio_probe(struct platform_device *pdev)
{
struct gpio_chip *gc;
- struct resource *iores;
struct xlp_gpio_priv *priv;
void __iomem *gpio_base;
int irq_base, irq, err;
int ngpio;
u32 soc_type;

- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!iores)
- return -ENODEV;
-
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;

- gpio_base = devm_ioremap_resource(&pdev->dev, iores);
+ gpio_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio_base))
return PTR_ERR(gpio_base);

--
1.9.1


Subject: [PATCH 40/42] drivers: gpio: zx: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-zx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-zx.c b/drivers/gpio/gpio-zx.c
index 5eacad9..fb92755 100644
--- a/drivers/gpio/gpio-zx.c
+++ b/drivers/gpio/gpio-zx.c
@@ -218,15 +218,13 @@ static int zx_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct zx_gpio *chip;
- struct resource *res;
int irq, id, ret;

chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- chip->base = devm_ioremap_resource(dev, res);
+ chip->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chip->base))
return PTR_ERR(chip->base);

--
1.9.1


Subject: [PATCH 39/42] drivers: gpio: xgene-sb: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-xgene-sb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-xgene-sb.c b/drivers/gpio/gpio-xgene-sb.c
index 2eb76f3..641a051 100644
--- a/drivers/gpio/gpio-xgene-sb.c
+++ b/drivers/gpio/gpio-xgene-sb.c
@@ -229,7 +229,6 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
{
struct xgene_gpio_sb *priv;
int ret;
- struct resource *res;
void __iomem *regs;
struct irq_domain *parent_domain = NULL;
u32 val32;
@@ -238,8 +237,7 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(&pdev->dev, res);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);

--
1.9.1


Subject: [PATCH 02/42] drivers: gpio: amdpt: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-amdpt.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
index 9b78dc8..1ffd7c2 100644
--- a/drivers/gpio/gpio-amdpt.c
+++ b/drivers/gpio/gpio-amdpt.c
@@ -78,7 +78,6 @@ static int pt_gpio_probe(struct platform_device *pdev)
struct acpi_device *acpi_dev;
acpi_handle handle = ACPI_HANDLE(dev);
struct pt_gpio_chip *pt_gpio;
- struct resource *res_mem;
int ret = 0;

if (acpi_bus_get_device(handle, &acpi_dev)) {
@@ -90,12 +89,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
if (!pt_gpio)
return -ENOMEM;

- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res_mem) {
- dev_err(&pdev->dev, "Failed to get MMIO resource for PT GPIO.\n");
- return -EINVAL;
- }
- pt_gpio->reg_base = devm_ioremap_resource(dev, res_mem);
+ pt_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pt_gpio->reg_base)) {
dev_err(&pdev->dev, "Failed to map MMIO resource for PT GPIO.\n");
return PTR_ERR(pt_gpio->reg_base);
--
1.9.1


Subject: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

don't need the temporary variable "dev", directly use &pdev->dev

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
drivers/gpio/gpio-janz-ttl.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
index b97a911..91f91f6 100644
--- a/drivers/gpio/gpio-janz-ttl.c
+++ b/drivers/gpio/gpio-janz-ttl.c
@@ -144,18 +144,17 @@ static void ttl_setup_device(struct ttl_module *mod)
static int ttl_probe(struct platform_device *pdev)
{
struct janz_platform_data *pdata;
- struct device *dev = &pdev->dev;
struct ttl_module *mod;
struct gpio_chip *gpio;
int ret;

pdata = dev_get_platdata(&pdev->dev);
if (!pdata) {
- dev_err(dev, "no platform data\n");
+ dev_err(&pdev->dev, "no platform data\n");
return -ENXIO;
}

- mod = devm_kzalloc(dev, sizeof(*mod), GFP_KERNEL);
+ mod = devm_kzalloc(&pdev->dev, sizeof(*mod), GFP_KERNEL);
if (!mod)
return -ENOMEM;

@@ -181,9 +180,9 @@ static int ttl_probe(struct platform_device *pdev)
gpio->base = -1;
gpio->ngpio = 20;

- ret = devm_gpiochip_add_data(dev, gpio, NULL);
+ ret = devm_gpiochip_add_data(&pdev->dev, gpio, NULL);
if (ret) {
- dev_err(dev, "unable to add GPIO chip\n");
+ dev_err(&pdev->dev, "unable to add GPIO chip\n");
return ret;
}

--
1.9.1


Subject: [PATCH 37/42] drivers: gpio: vf610: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-vf610.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 541fa6a..4b86a2d 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -251,7 +251,6 @@ static int vf610_gpio_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct vf610_gpio_port *port;
- struct resource *iores;
struct gpio_chip *gc;
int i;
int ret;
@@ -261,13 +260,11 @@ static int vf610_gpio_probe(struct platform_device *pdev)
return -ENOMEM;

port->sdata = of_device_get_match_data(dev);
- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- port->base = devm_ioremap_resource(dev, iores);
+ port->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(port->base))
return PTR_ERR(port->base);

- iores = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- port->gpio_base = devm_ioremap_resource(dev, iores);
+ port->gpio_base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(port->gpio_base))
return PTR_ERR(port->gpio_base);

--
1.9.1


Subject: [PATCH 14/42] drivers: gpio: iop: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-iop.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-iop.c b/drivers/gpio/gpio-iop.c
index 8d62db4..11b77d8 100644
--- a/drivers/gpio/gpio-iop.c
+++ b/drivers/gpio/gpio-iop.c
@@ -21,7 +21,6 @@

static int iop3xx_gpio_probe(struct platform_device *pdev)
{
- struct resource *res;
struct gpio_chip *gc;
void __iomem *base;
int err;
@@ -30,8 +29,7 @@ static int iop3xx_gpio_probe(struct platform_device *pdev)
if (!gc)
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);

--
1.9.1


Subject: [PATCH 31/42] drivers: gpio: stp-xway: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-stp-xway.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c
index 1997208..8a319d5 100644
--- a/drivers/gpio/gpio-stp-xway.c
+++ b/drivers/gpio/gpio-stp-xway.c
@@ -210,7 +210,6 @@ static int xway_stp_hw_init(struct xway_stp *chip)

static int xway_stp_probe(struct platform_device *pdev)
{
- struct resource *res;
u32 shadow, groups, dsl, phy;
struct xway_stp *chip;
struct clk *clk;
@@ -220,8 +219,7 @@ static int xway_stp_probe(struct platform_device *pdev)
if (!chip)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- chip->virt = devm_ioremap_resource(&pdev->dev, res);
+ chip->virt = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(chip->virt))
return PTR_ERR(chip->virt);

--
1.9.1


Subject: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-sprd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
index 55072d2..f5c8b3a 100644
--- a/drivers/gpio/gpio-sprd.c
+++ b/drivers/gpio/gpio-sprd.c
@@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
{
struct gpio_irq_chip *irq;
struct sprd_gpio *sprd_gpio;
- struct resource *res;
int ret;

sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
@@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
return sprd_gpio->irq;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
+ sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sprd_gpio->base))
return PTR_ERR(sprd_gpio->base);

--
1.9.1


Subject: [PATCH 25/42] drivers: gpio: pxa: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-pxa.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index bcc6be4..dd47960 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -622,7 +622,6 @@ static int pxa_gpio_probe(struct platform_device *pdev)
{
struct pxa_gpio_chip *pchip;
struct pxa_gpio_bank *c;
- struct resource *res;
struct clk *clk;
struct pxa_gpio_platform_data *info;
void __iomem *gpio_reg_base;
@@ -665,11 +664,8 @@ static int pxa_gpio_probe(struct platform_device *pdev)

pchip->irq0 = irq0;
pchip->irq1 = irq1;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
- gpio_reg_base = devm_ioremap(&pdev->dev, res->start,
- resource_size(res));
+
+ gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (!gpio_reg_base)
return -EINVAL;

--
1.9.1


Subject: [PATCH 30/42] drivers: gpio: sta2x11: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-sta2x11.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c
index 2283c86..a51c310 100644
--- a/drivers/gpio/gpio-sta2x11.c
+++ b/drivers/gpio/gpio-sta2x11.c
@@ -360,7 +360,6 @@ static int gsta_probe(struct platform_device *dev)
struct pci_dev *pdev;
struct sta2x11_gpio_pdata *gpio_pdata;
struct gsta_gpio *chip;
- struct resource *res;

pdev = *(struct pci_dev **)dev_get_platdata(&dev->dev);
gpio_pdata = dev_get_platdata(&pdev->dev);
@@ -369,13 +368,11 @@ static int gsta_probe(struct platform_device *dev)
dev_err(&dev->dev, "no gpio config\n");
pr_debug("gpio config: %p\n", gpio_pdata);

- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-
chip = devm_kzalloc(&dev->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
chip->dev = &dev->dev;
- chip->reg_base = devm_ioremap_resource(&dev->dev, res);
+ chip->reg_base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(chip->reg_base))
return PTR_ERR(chip->reg_base);

--
1.9.1


Subject: [PATCH 32/42] drivers: gpio: tb10x: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-tb10x.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c
index d5e5d19..6bbac6c 100644
--- a/drivers/gpio/gpio-tb10x.c
+++ b/drivers/gpio/gpio-tb10x.c
@@ -120,7 +120,6 @@ static irqreturn_t tb10x_gpio_irq_cascade(int irq, void *data)
static int tb10x_gpio_probe(struct platform_device *pdev)
{
struct tb10x_gpio *tb10x_gpio;
- struct resource *mem;
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
int ret = -EBUSY;
@@ -136,8 +135,7 @@ static int tb10x_gpio_probe(struct platform_device *pdev)
if (tb10x_gpio == NULL)
return -ENOMEM;

- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tb10x_gpio->base = devm_ioremap_resource(dev, mem);
+ tb10x_gpio->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(tb10x_gpio->base))
return PTR_ERR(tb10x_gpio->base);

--
1.9.1


Subject: [PATCH 27/42] drivers: gpio: rcar: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-rcar.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
index df4419e..187984d 100644
--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -430,7 +430,7 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
static int gpio_rcar_probe(struct platform_device *pdev)
{
struct gpio_rcar_priv *p;
- struct resource *io, *irq;
+ struct resource *irq;
struct gpio_chip *gpio_chip;
struct irq_chip *irq_chip;
struct device *dev = &pdev->dev;
@@ -461,8 +461,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
goto err0;
}

- io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- p->base = devm_ioremap_resource(dev, io);
+ p->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(p->base)) {
ret = PTR_ERR(p->base);
goto err0;
--
1.9.1


Subject: [PATCH 10/42] drivers: gpio: ep93xx: devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-ep93xx.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 71728d6..52e9a7b2 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -393,16 +393,13 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev,
static int ep93xx_gpio_probe(struct platform_device *pdev)
{
struct ep93xx_gpio *epg;
- struct resource *res;
int i;
- struct device *dev = &pdev->dev;

- epg = devm_kzalloc(dev, sizeof(*epg), GFP_KERNEL);
+ epg = devm_kzalloc(&odev->dev, sizeof(*epg), GFP_KERNEL);
if (!epg)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- epg->base = devm_ioremap_resource(dev, res);
+ epg->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(epg->base))
return PTR_ERR(epg->base);

--
1.9.1


Subject: [PATCH 34/42] drivers: gpio: timberdale: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-timberdale.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 314e300..1c70e83 100644
--- a/drivers/gpio/gpio-timberdale.c
+++ b/drivers/gpio/gpio-timberdale.c
@@ -229,7 +229,6 @@ static int timbgpio_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct gpio_chip *gc;
struct timbgpio *tgpio;
- struct resource *iomem;
struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
int irq = platform_get_irq(pdev, 0);

@@ -246,8 +245,7 @@ static int timbgpio_probe(struct platform_device *pdev)

spin_lock_init(&tgpio->lock);

- iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tgpio->membase = devm_ioremap_resource(dev, iomem);
+ tgpio->membase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(tgpio->membase))
return PTR_ERR(tgpio->membase);

--
1.9.1


Subject: [PATCH 23/42] drivers: gpio: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-octeon.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 1b19c88..afb0e8a 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -82,7 +82,6 @@ static int octeon_gpio_probe(struct platform_device *pdev)
{
struct octeon_gpio *gpio;
struct gpio_chip *chip;
- struct resource *res_mem;
void __iomem *reg_base;
int err = 0;

@@ -91,8 +90,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
chip = &gpio->chip;

- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
+ reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg_base))
return PTR_ERR(reg_base);

--
1.9.1


Subject: [PATCH 33/42] drivers: gpio: tegra: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-tegra.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1ececf2..6d9b690 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -569,7 +569,6 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi)
static int tegra_gpio_probe(struct platform_device *pdev)
{
struct tegra_gpio_info *tgi;
- struct resource *res;
struct tegra_gpio_bank *bank;
unsigned int gpio, i, j;
int ret;
@@ -645,8 +644,7 @@ static int tegra_gpio_probe(struct platform_device *pdev)
bank->tgi = tgi;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- tgi->regs = devm_ioremap_resource(&pdev->dev, res);
+ tgi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(tgi->regs))
return PTR_ERR(tgi->regs);

--
1.9.1


Subject: [PATCH 24/42] drivers: gpio: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-omap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 7f33024..ce6e67a 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1289,7 +1289,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
struct device_node *node = dev->of_node;
const struct of_device_id *match;
const struct omap_gpio_platform_data *pdata;
- struct resource *res;
struct gpio_bank *bank;
struct irq_chip *irqc;
int ret;
@@ -1375,8 +1374,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
raw_spin_lock_init(&bank->wa_lock);

/* Static mapping, never released */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- bank->base = devm_ioremap_resource(dev, res);
+ bank->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(bank->base)) {
return PTR_ERR(bank->base);
}
--
1.9.1


Subject: [PATCH 35/42] drivers: gpio: ts4800: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-ts4800.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-ts4800.c b/drivers/gpio/gpio-ts4800.c
index c2a80b4..8c0d82d 100644
--- a/drivers/gpio/gpio-ts4800.c
+++ b/drivers/gpio/gpio-ts4800.c
@@ -23,7 +23,6 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
{
struct device_node *node;
struct gpio_chip *chip;
- struct resource *res;
void __iomem *base_addr;
int retval;
u32 ngpios;
@@ -32,8 +31,7 @@ static int ts4800_gpio_probe(struct platform_device *pdev)
if (!chip)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base_addr = devm_ioremap_resource(&pdev->dev, res);
+ base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base_addr))
return PTR_ERR(base_addr);

--
1.9.1


Subject: [PATCH 21/42] drivers: gpio: mvebu: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-mvebu.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index f97ed32..059094a 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -1038,11 +1038,9 @@ static int mvebu_gpio_resume(struct platform_device *pdev)
static int mvebu_gpio_probe_raw(struct platform_device *pdev,
struct mvebu_gpio_chip *mvchip)
{
- struct resource *res;
void __iomem *base;

- 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);

@@ -1062,8 +1060,7 @@ static int mvebu_gpio_probe_raw(struct platform_device *pdev,
* per-CPU registers
*/
if (mvchip->soc_variant == MVEBU_GPIO_SOC_VARIANT_ARMADAXP) {
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(base))
return PTR_ERR(base);

--
1.9.1


Subject: [PATCH 13/42] drivers: gpio: hlwd: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-hlwd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-hlwd.c b/drivers/gpio/gpio-hlwd.c
index a7b1789..e5fa00f 100644
--- a/drivers/gpio/gpio-hlwd.c
+++ b/drivers/gpio/gpio-hlwd.c
@@ -208,7 +208,6 @@ static int hlwd_gpio_irq_set_type(struct irq_data *data, unsigned int flow_type)
static int hlwd_gpio_probe(struct platform_device *pdev)
{
struct hlwd_gpio *hlwd;
- struct resource *regs_resource;
u32 ngpios;
int res;

@@ -216,8 +215,7 @@ static int hlwd_gpio_probe(struct platform_device *pdev)
if (!hlwd)
return -ENOMEM;

- regs_resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hlwd->regs = devm_ioremap_resource(&pdev->dev, regs_resource);
+ hlwd->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hlwd->regs))
return PTR_ERR(hlwd->regs);

--
1.9.1


Subject: [PATCH 19/42] drivers: gpio: mb86s7x: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-mb86s7x.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c
index 3134c0d..9308081 100644
--- a/drivers/gpio/gpio-mb86s7x.c
+++ b/drivers/gpio/gpio-mb86s7x.c
@@ -146,7 +146,6 @@ static void mb86s70_gpio_set(struct gpio_chip *gc, unsigned gpio, int value)
static int mb86s70_gpio_probe(struct platform_device *pdev)
{
struct mb86s70_gpio_chip *gchip;
- struct resource *res;
int ret;

gchip = devm_kzalloc(&pdev->dev, sizeof(*gchip), GFP_KERNEL);
@@ -155,8 +154,7 @@ static int mb86s70_gpio_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, gchip);

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gchip->base = devm_ioremap_resource(&pdev->dev, res);
+ gchip->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gchip->base))
return PTR_ERR(gchip->base);

--
1.9.1


Subject: [PATCH 28/42] drivers: gpio: spear-spics: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-spear-spics.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-spear-spics.c b/drivers/gpio/gpio-spear-spics.c
index ee3039f..6eca531 100644
--- a/drivers/gpio/gpio-spear-spics.c
+++ b/drivers/gpio/gpio-spear-spics.c
@@ -122,15 +122,13 @@ static int spics_gpio_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct spear_spics *spics;
- struct resource *res;
int ret;

spics = devm_kzalloc(&pdev->dev, sizeof(*spics), GFP_KERNEL);
if (!spics)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- spics->base = devm_ioremap_resource(&pdev->dev, res);
+ spics->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(spics->base))
return PTR_ERR(spics->base);

--
1.9.1


Subject: [PATCH 07/42] drivers: gpio: clps711x: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-clps711x.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-clps711x.c b/drivers/gpio/gpio-clps711x.c
index 52fd63f..0fbbb0e 100644
--- a/drivers/gpio/gpio-clps711x.c
+++ b/drivers/gpio/gpio-clps711x.c
@@ -19,7 +19,6 @@ static int clps711x_gpio_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node;
void __iomem *dat, *dir;
struct gpio_chip *gc;
- struct resource *res;
int err, id;

if (!np)
@@ -33,13 +32,11 @@ static int clps711x_gpio_probe(struct platform_device *pdev)
if (!gc)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dat = devm_ioremap_resource(&pdev->dev, res);
+ dat = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dat))
return PTR_ERR(dat);

- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- dir = devm_ioremap_resource(&pdev->dev, res);
+ dir = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(dir))
return PTR_ERR(dir);

--
1.9.1


Subject: [PATCH 20/42] drivers: gpio: mt7621: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-mt7621.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 74401e0..79654fb 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -293,7 +293,6 @@ struct mtk {
static int
mediatek_gpio_probe(struct platform_device *pdev)
{
- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct mtk *mtk;
@@ -304,7 +303,7 @@ struct mtk {
if (!mtk)
return -ENOMEM;

- mtk->base = devm_ioremap_resource(dev, res);
+ mtk->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mtk->base))
return PTR_ERR(mtk->base);

--
1.9.1


Subject: [PATCH 18/42] drivers: gpio: lpc18xx: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-lpc18xx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c
index d441dba..d711ae0 100644
--- a/drivers/gpio/gpio-lpc18xx.c
+++ b/drivers/gpio/gpio-lpc18xx.c
@@ -340,10 +340,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
index = of_property_match_string(dev->of_node, "reg-names", "gpio");
if (index < 0) {
/* To support backward compatibility take the first resource */
- struct resource *res;
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gc->base = devm_ioremap_resource(dev, res);
+ gc->base = devm_platform_ioremap_resource(pdev, 0);
} else {
struct resource res;

--
1.9.1


Subject: [PATCH 17/42] drivers: gpio: loongon1: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-loongson1.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-loongson1.c b/drivers/gpio/gpio-loongson1.c
index fca84cc..1b1ee94 100644
--- a/drivers/gpio/gpio-loongson1.c
+++ b/drivers/gpio/gpio-loongson1.c
@@ -47,15 +47,13 @@ static int ls1x_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct gpio_chip *gc;
- struct resource *res;
int ret;

gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL);
if (!gc)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpio_reg_base = devm_ioremap_resource(dev, res);
+ gpio_reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio_reg_base))
return PTR_ERR(gpio_reg_base);

--
1.9.1


Subject: [PATCH 22/42] drivers: gpio: mxc: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-mxc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index e86e61d..b281358 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -411,7 +411,6 @@ static int mxc_gpio_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct mxc_gpio_port *port;
- struct resource *iores;
int irq_base;
int err;

@@ -423,8 +422,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)

port->dev = &pdev->dev;

- iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- port->base = devm_ioremap_resource(&pdev->dev, iores);
+ port->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(port->base))
return PTR_ERR(port->base);

--
1.9.1


Subject: [PATCH 09/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-eic-sprd.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index f0223ce..c12de87 100644
--- a/drivers/gpio/gpio-eic-sprd.c
+++ b/drivers/gpio/gpio-eic-sprd.c
@@ -567,7 +567,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
const struct sprd_eic_variant_data *pdata;
struct gpio_irq_chip *irq;
struct sprd_eic *sprd_eic;
- struct resource *res;
int ret, i;

pdata = of_device_get_match_data(&pdev->dev);
@@ -596,13 +595,9 @@ static int sprd_eic_probe(struct platform_device *pdev)
* have one bank EIC, thus base[1] and base[2] can be
* optional.
*/
- res = platform_get_resource(pdev, IORESOURCE_MEM, i);
- if (!res)
- continue;
-
- sprd_eic->base[i] = devm_ioremap_resource(&pdev->dev, res);
+ sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sprd_eic->base[i]))
- return PTR_ERR(sprd_eic->base[i]);
+ continue;
}

sprd_eic->chip.label = sprd_eic_label_name[sprd_eic->type];
--
1.9.1


Subject: [PATCH 03/42] drivers: gpio: amdpt: drop unneeded deref of &pdev->dev

We already have the struct device* pointer in a local variable,
so we can write this a bit shorter.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
drivers/gpio/gpio-amdpt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
index 1ffd7c2..3220f3c 100644
--- a/drivers/gpio/gpio-amdpt.c
+++ b/drivers/gpio/gpio-amdpt.c
@@ -91,7 +91,7 @@ static int pt_gpio_probe(struct platform_device *pdev)

pt_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pt_gpio->reg_base)) {
- dev_err(&pdev->dev, "Failed to map MMIO resource for PT GPIO.\n");
+ dev_err(dev, "Failed to map MMIO resource for PT GPIO.\n");
return PTR_ERR(pt_gpio->reg_base);
}

@@ -101,7 +101,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
pt_gpio->reg_base + PT_DIRECTION_REG, NULL,
BGPIOF_READ_OUTPUT_REG_SET);
if (ret) {
- dev_err(&pdev->dev, "bgpio_init failed\n");
+ dev_err(dev, "bgpio_init failed\n");
return ret;
}

@@ -110,11 +110,11 @@ static int pt_gpio_probe(struct platform_device *pdev)
pt_gpio->gc.free = pt_gpio_free;
pt_gpio->gc.ngpio = PT_TOTAL_GPIO;
#if defined(CONFIG_OF_GPIO)
- pt_gpio->gc.of_node = pdev->dev.of_node;
+ pt_gpio->gc.of_node = dev.of_node;
#endif
ret = gpiochip_add_data(&pt_gpio->gc, pt_gpio);
if (ret) {
- dev_err(&pdev->dev, "Failed to register GPIO lib\n");
+ dev_err(dev, "Failed to register GPIO lib\n");
return ret;
}

@@ -124,7 +124,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
writel(0, pt_gpio->reg_base + PT_SYNC_REG);
writel(0, pt_gpio->reg_base + PT_CLOCKRATE_REG);

- dev_dbg(&pdev->dev, "PT GPIO driver loaded\n");
+ dev_dbg(dev, "PT GPIO driver loaded\n");
return ret;
}

--
1.9.1


Subject: [PATCH 04/42] drivers: gpio: aspeed: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-aspeed.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-aspeed.c b/drivers/gpio/gpio-aspeed.c
index 854bce4..44aa843 100644
--- a/drivers/gpio/gpio-aspeed.c
+++ b/drivers/gpio/gpio-aspeed.c
@@ -1156,15 +1156,13 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
{
const struct of_device_id *gpio_id;
struct aspeed_gpio *gpio;
- struct resource *res;
int rc, i, banks;

gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL);
if (!gpio)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpio->base = devm_ioremap_resource(&pdev->dev, res);
+ gpio->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio->base))
return PTR_ERR(gpio->base);

--
1.9.1


Subject: [PATCH 15/42] drivers: gpio: janz-ttl: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-janz-ttl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
index 6b9bf8b..b97a911 100644
--- a/drivers/gpio/gpio-janz-ttl.c
+++ b/drivers/gpio/gpio-janz-ttl.c
@@ -147,7 +147,6 @@ static int ttl_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct ttl_module *mod;
struct gpio_chip *gpio;
- struct resource *res;
int ret;

pdata = dev_get_platdata(&pdev->dev);
@@ -164,8 +163,7 @@ static int ttl_probe(struct platform_device *pdev)
spin_lock_init(&mod->lock);

/* get access to the MODULbus registers for this module */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mod->regs = devm_ioremap_resource(dev, res);
+ mod->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mod->regs))
return PTR_ERR(mod->regs);

--
1.9.1


2019-03-11 19:02:00

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 05/42] drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()

On 3/11/19 11:54 AM, 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 <[email protected]>
> ---
> drivers/gpio/gpio-bcm-kona.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index c5536a5..9fa6d3a 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -568,7 +568,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> const struct of_device_id *match;
> - struct resource *res;
> struct bcm_kona_gpio_bank *bank;
> struct bcm_kona_gpio *kona_gpio;
> struct gpio_chip *chip;
> @@ -618,8 +617,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
> return -ENXIO;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - kona_gpio->reg_base = devm_ioremap_resource(dev, res);
> + kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);

Reviewed-by: Florian Fainelli <[email protected]>
--
Florian

Subject: [PATCH 11/42] drivers: gpio: ftgpio010: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-ftgpio010.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c
index 45fe125..8ff8ce2 100644
--- a/drivers/gpio/gpio-ftgpio010.c
+++ b/drivers/gpio/gpio-ftgpio010.c
@@ -225,7 +225,6 @@ static int ftgpio_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
static int ftgpio_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct ftgpio_gpio *g;
int irq;
int ret;
@@ -236,8 +235,7 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)

g->dev = dev;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- g->base = devm_ioremap_resource(dev, res);
+ g->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(g->base))
return PTR_ERR(g->base);

--
1.9.1


Subject: [PATCH 05/42] drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-bcm-kona.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index c5536a5..9fa6d3a 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -568,7 +568,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
const struct of_device_id *match;
- struct resource *res;
struct bcm_kona_gpio_bank *bank;
struct bcm_kona_gpio *kona_gpio;
struct gpio_chip *chip;
@@ -618,8 +617,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
return -ENXIO;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- kona_gpio->reg_base = devm_ioremap_resource(dev, res);
+ kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(kona_gpio->reg_base)) {
ret = -ENXIO;
goto err_irq_domain;
--
1.9.1


Subject: [PATCH 08/42] drivers: gpio: dwap: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-dwapb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 84ae044..d3eda65 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -655,7 +655,6 @@ static void dwapb_gpio_unregister(struct dwapb_gpio *gpio)
static int dwapb_gpio_probe(struct platform_device *pdev)
{
unsigned int i;
- struct resource *res;
struct dwapb_gpio *gpio;
int err;
struct device *dev = &pdev->dev;
@@ -688,8 +687,7 @@ static int dwapb_gpio_probe(struct platform_device *pdev)
if (!gpio->ports)
return -ENOMEM;

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpio->regs = devm_ioremap_resource(&pdev->dev, res);
+ gpio->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpio->regs))
return PTR_ERR(gpio->regs);

--
1.9.1


2019-03-11 19:03:01

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 24/42] drivers: gpio: use devm_platform_ioremap_resource()

On 3/11/19 11:55 AM, 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 <[email protected]>

Same here, missing an "omap: " qualifier in the subject.
--
Florian

2019-03-11 19:03:27

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 23/42] drivers: gpio: use devm_platform_ioremap_resource()

On 3/11/19 11:55 AM, 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 <[email protected]>

The subject is missing an "octeon: " part here to indicate which driver
this applies to.

Maybe you should convert all drivers in one go though?
--
Florian

Subject: [PATCH] drivers: gpio: octeon: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-octeon.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 1b19c88..afb0e8a 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -82,7 +82,6 @@ static int octeon_gpio_probe(struct platform_device *pdev)
{
struct octeon_gpio *gpio;
struct gpio_chip *chip;
- struct resource *res_mem;
void __iomem *reg_base;
int err = 0;

@@ -91,8 +90,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
chip = &gpio->chip;

- res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
+ reg_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg_base))
return PTR_ERR(reg_base);

--
1.9.1


Subject: [PATCH] drivers: gpio: omap: use devm_platform_ioremap_resource()

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 <[email protected]>
---
drivers/gpio/gpio-omap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 7f33024..ce6e67a 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1289,7 +1289,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
struct device_node *node = dev->of_node;
const struct of_device_id *match;
const struct omap_gpio_platform_data *pdata;
- struct resource *res;
struct gpio_bank *bank;
struct irq_chip *irqc;
int ret;
@@ -1375,8 +1374,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
raw_spin_lock_init(&bank->wa_lock);

/* Static mapping, never released */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- bank->base = devm_ioremap_resource(dev, res);
+ bank->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(bank->base)) {
return PTR_ERR(bank->base);
}
--
1.9.1


2019-03-11 20:06:03

by Vladimir Zapolskiy

[permalink] [raw]
Subject: Re: [PATCH 18/42] drivers: gpio: lpc18xx: use devm_platform_ioremap_resource()

On 03/11/2019 08:54 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 <[email protected]>
> ---
> drivers/gpio/gpio-lpc18xx.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-lpc18xx.c b/drivers/gpio/gpio-lpc18xx.c
> index d441dba..d711ae0 100644
> --- a/drivers/gpio/gpio-lpc18xx.c
> +++ b/drivers/gpio/gpio-lpc18xx.c
> @@ -340,10 +340,7 @@ static int lpc18xx_gpio_probe(struct platform_device *pdev)
> index = of_property_match_string(dev->of_node, "reg-names", "gpio");
> if (index < 0) {
> /* To support backward compatibility take the first resource */
> - struct resource *res;
> -
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - gc->base = devm_ioremap_resource(dev, res);
> + gc->base = devm_platform_ioremap_resource(pdev, 0);
> } else {
> struct resource res;
>
>

Acked-by: Vladimir Zapolskiy <[email protected]>

--
Best wishes,
Vladimir

2019-03-12 02:39:35

by Baolin Wang

[permalink] [raw]
Subject: Re: [PATCH 09/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On Tue, 12 Mar 2019 at 02:55, Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>
> ---
> drivers/gpio/gpio-eic-sprd.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
> index f0223ce..c12de87 100644
> --- a/drivers/gpio/gpio-eic-sprd.c
> +++ b/drivers/gpio/gpio-eic-sprd.c
> @@ -567,7 +567,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
> const struct sprd_eic_variant_data *pdata;
> struct gpio_irq_chip *irq;
> struct sprd_eic *sprd_eic;
> - struct resource *res;
> int ret, i;
>
> pdata = of_device_get_match_data(&pdev->dev);
> @@ -596,13 +595,9 @@ static int sprd_eic_probe(struct platform_device *pdev)
> * have one bank EIC, thus base[1] and base[2] can be
> * optional.
> */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, i);
> - if (!res)
> - continue;
> -
> - sprd_eic->base[i] = devm_ioremap_resource(&pdev->dev, res);
> + sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, 0);

This is incorrect, since we can have multiple IO resources, but you
only get index 0.

> if (IS_ERR(sprd_eic->base[i]))
> - return PTR_ERR(sprd_eic->base[i]);
> + continue;
> }
>
> sprd_eic->chip.label = sprd_eic_label_name[sprd_eic->type];
> --
> 1.9.1
>
--
Baolin Wang
Best Regards

2019-03-12 02:40:58

by Baolin Wang

[permalink] [raw]
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

Hi,
On Tue, 12 Mar 2019 at 02:57, Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>
> ---
> drivers/gpio/gpio-sprd.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
> index 55072d2..f5c8b3a 100644
> --- a/drivers/gpio/gpio-sprd.c
> +++ b/drivers/gpio/gpio-sprd.c
> @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> {
> struct gpio_irq_chip *irq;
> struct sprd_gpio *sprd_gpio;
> - struct resource *res;
> int ret;
>
> sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
> @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> return sprd_gpio->irq;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
> + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sprd_gpio->base))
> return PTR_ERR(sprd_gpio->base);
>

Thanks for your patch.

Reviewed-by: Baolin Wang <[email protected]>

--
Baolin Wang
Best Regards

Subject: Re: [PATCH 09/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On 12.03.19 03:38, Baolin Wang wrote:
> On Tue, 12 Mar 2019 at 02:55, Enrico Weigelt, metux IT consult
> <[email protected]> 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 <[email protected]>
>> ---
>> drivers/gpio/gpio-eic-sprd.c | 9 ++-------
>> 1 file changed, 2 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
>> index f0223ce..c12de87 100644
>> --- a/drivers/gpio/gpio-eic-sprd.c
>> +++ b/drivers/gpio/gpio-eic-sprd.c
>> @@ -567,7 +567,6 @@ static int sprd_eic_probe(struct platform_device *pdev)
>> const struct sprd_eic_variant_data *pdata;
>> struct gpio_irq_chip *irq;
>> struct sprd_eic *sprd_eic;
>> - struct resource *res;
>> int ret, i;
>>
>> pdata = of_device_get_match_data(&pdev->dev);
>> @@ -596,13 +595,9 @@ static int sprd_eic_probe(struct platform_device *pdev)
>> * have one bank EIC, thus base[1] and base[2] can be
>> * optional.
>> */
>> - res = platform_get_resource(pdev, IORESOURCE_MEM, i);
>> - if (!res)
>> - continue;
>> -
>> - sprd_eic->base[i] = devm_ioremap_resource(&pdev->dev, res);
>> + sprd_eic->base[i] = devm_platform_ioremap_resource(pdev, 0);
>
> This is incorrect, since we can have multiple IO resources, but you
> only get index 0.

ah, right, it has to be i instead of 0. thanks for pointing that out.


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

2019-03-12 09:19:00

by Ben Dooks

[permalink] [raw]
Subject: Re: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

On 11/03/2019 18:54, Enrico Weigelt, metux IT consult wrote:
> don't need the temporary variable "dev", directly use &pdev->dev
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

This is quite usual to do, and I like it as it saves typing.
Personally I would say don't bother with this change.

> ---
> drivers/gpio/gpio-janz-ttl.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
> index b97a911..91f91f6 100644
> --- a/drivers/gpio/gpio-janz-ttl.c
> +++ b/drivers/gpio/gpio-janz-ttl.c
> @@ -144,18 +144,17 @@ static void ttl_setup_device(struct ttl_module *mod)
> static int ttl_probe(struct platform_device *pdev)
> {
> struct janz_platform_data *pdata;
> - struct device *dev = &pdev->dev;
> struct ttl_module *mod;
> struct gpio_chip *gpio;
> int ret;
>
> pdata = dev_get_platdata(&pdev->dev);
> if (!pdata) {
> - dev_err(dev, "no platform data\n");
> + dev_err(&pdev->dev, "no platform data\n");
> return -ENXIO;
> }
>
> - mod = devm_kzalloc(dev, sizeof(*mod), GFP_KERNEL);
> + mod = devm_kzalloc(&pdev->dev, sizeof(*mod), GFP_KERNEL);
> if (!mod)
> return -ENOMEM;
>
> @@ -181,9 +180,9 @@ static int ttl_probe(struct platform_device *pdev)
> gpio->base = -1;
> gpio->ngpio = 20;
>
> - ret = devm_gpiochip_add_data(dev, gpio, NULL);
> + ret = devm_gpiochip_add_data(&pdev->dev, gpio, NULL);
> if (ret) {
> - dev_err(dev, "unable to add GPIO chip\n");
> + dev_err(&pdev->dev, "unable to add GPIO chip\n");
> return ret;
> }
>
>


--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

Subject: Re: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

On 12.03.19 10:17, Ben Dooks wrote:
> On 11/03/2019 18:54, Enrico Weigelt, metux IT consult wrote:
>> don't need the temporary variable "dev", directly use &pdev->dev
>>
>> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
>
> This is quite usual to do, and I like it as it saves typing.
> Personally I would say don't bother with this change.

hmm, both approaches have their valid arguments.

I'm not particularily biased to one or another ay, but I'd prefer
having it consistent everywhere.


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

2019-03-12 09:39:41

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 36/42] drivers: gpio: uniphier: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 3:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>
> ---


Acked-by: Masahiro Yamada <[email protected]>


> drivers/gpio/gpio-uniphier.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c
> index 0f662b2..93cdcc4 100644
> --- a/drivers/gpio/gpio-uniphier.c
> +++ b/drivers/gpio/gpio-uniphier.c
> @@ -346,7 +346,6 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
> struct uniphier_gpio_priv *priv;
> struct gpio_chip *chip;
> struct irq_chip *irq_chip;
> - struct resource *regs;
> unsigned int nregs;
> u32 ngpios;
> int ret;
> @@ -370,8 +369,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev)
> if (!priv)
> return -ENOMEM;
>
> - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->regs = devm_ioremap_resource(dev, regs);
> + priv->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->regs))
> return PTR_ERR(priv->regs);
>
> --
> 1.9.1
>


--
Best Regards
Masahiro Yamada

2019-03-12 11:15:07

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH 20/42] drivers: gpio: mt7621: use devm_platform_ioremap_resource()



On 11/03/2019 19:54, 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 <[email protected]>
> ---
> drivers/gpio/gpio-mt7621.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Matthias Brugger <[email protected]>

>
> diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
> index 74401e0..79654fb 100644
> --- a/drivers/gpio/gpio-mt7621.c
> +++ b/drivers/gpio/gpio-mt7621.c
> @@ -293,7 +293,6 @@ struct mtk {
> static int
> mediatek_gpio_probe(struct platform_device *pdev)
> {
> - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> struct device *dev = &pdev->dev;
> struct device_node *np = dev->of_node;
> struct mtk *mtk;
> @@ -304,7 +303,7 @@ struct mtk {
> if (!mtk)
> return -ENOMEM;
>
> - mtk->base = devm_ioremap_resource(dev, res);
> + mtk->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(mtk->base))
> return PTR_ERR(mtk->base);
>
>

2019-03-12 11:23:07

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 03/42] drivers: gpio: amdpt: drop unneeded deref of &pdev->dev

On Mon, Mar 11, 2019 at 07:54:42PM +0100, Enrico Weigelt, metux IT consult wrote:
> We already have the struct device* pointer in a local variable,
> so we can write this a bit shorter.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
> ---
> drivers/gpio/gpio-amdpt.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
> index 1ffd7c2..3220f3c 100644
> --- a/drivers/gpio/gpio-amdpt.c
> +++ b/drivers/gpio/gpio-amdpt.c
> @@ -91,7 +91,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
>
> pt_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(pt_gpio->reg_base)) {
> - dev_err(&pdev->dev, "Failed to map MMIO resource for PT GPIO.\n");
> + dev_err(dev, "Failed to map MMIO resource for PT GPIO.\n");
> return PTR_ERR(pt_gpio->reg_base);
> }
>
> @@ -101,7 +101,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
> pt_gpio->reg_base + PT_DIRECTION_REG, NULL,
> BGPIOF_READ_OUTPUT_REG_SET);
> if (ret) {
> - dev_err(&pdev->dev, "bgpio_init failed\n");
> + dev_err(dev, "bgpio_init failed\n");
> return ret;
> }
>
> @@ -110,11 +110,11 @@ static int pt_gpio_probe(struct platform_device *pdev)
> pt_gpio->gc.free = pt_gpio_free;
> pt_gpio->gc.ngpio = PT_TOTAL_GPIO;
> #if defined(CONFIG_OF_GPIO)
> - pt_gpio->gc.of_node = pdev->dev.of_node;
> + pt_gpio->gc.of_node = dev.of_node;

"dev->of_node"?

Thierry


Attachments:
(No filename) (1.54 kB)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:24:07

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 10/42] drivers: gpio: ep93xx: devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:54:49PM +0100, 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 <[email protected]>
> ---
> drivers/gpio/gpio-ep93xx.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
> index 71728d6..52e9a7b2 100644
> --- a/drivers/gpio/gpio-ep93xx.c
> +++ b/drivers/gpio/gpio-ep93xx.c
> @@ -393,16 +393,13 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, struct device *dev,
> static int ep93xx_gpio_probe(struct platform_device *pdev)
> {
> struct ep93xx_gpio *epg;
> - struct resource *res;
> int i;
> - struct device *dev = &pdev->dev;
>
> - epg = devm_kzalloc(dev, sizeof(*epg), GFP_KERNEL);
> + epg = devm_kzalloc(&odev->dev, sizeof(*epg), GFP_KERNEL);

odev -> pdev

You should write some scripts to compile-test these changes. Compilers
are good at catching these silly typos. Humans not so much.

Thierry


Attachments:
(No filename) (1.08 kB)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:25:56

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 12/42] drivers: gpio: grgpio: use devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:54:51PM +0100, 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 <[email protected]>
> ---
> drivers/gpio/gpio-grgpio.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
> index 45b8d6a..09d3dac 100644
> --- a/drivers/gpio/gpio-grgpio.c
> +++ b/drivers/gpio/gpio-grgpio.c
> @@ -333,7 +333,6 @@ static int grgpio_probe(struct platform_device *ofdev)
> void __iomem *regs;
> struct gpio_chip *gc;
> struct grgpio_priv *priv;
> - struct resource *res;
> int err;
> u32 prop;
> s32 *irqmap;
> @@ -344,8 +343,7 @@ static int grgpio_probe(struct platform_device *ofdev)
> if (!priv)
> return -ENOMEM;
>
> - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
> - regs = devm_ioremap_resource(&ofdev->dev, res);
> + regs = devm_platform_ioremap_resource(&ofdev, 0);

Drop the &?

Thierry


Attachments:
(No filename) (1.07 kB)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:26:53

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

On Tue, Mar 12, 2019 at 10:33:44AM +0100, Enrico Weigelt, metux IT consult wrote:
> On 12.03.19 10:17, Ben Dooks wrote:
> > On 11/03/2019 18:54, Enrico Weigelt, metux IT consult wrote:
> >> don't need the temporary variable "dev", directly use &pdev->dev
> >>
> >> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
> >
> > This is quite usual to do, and I like it as it saves typing.
> > Personally I would say don't bother with this change.
>
> hmm, both approaches have their valid arguments.
>
> I'm not particularily biased to one or another ay, but I'd prefer
> having it consistent everywhere.

You're not consistent within the series itself. In patch 3 you went the
other way and dropped usage of pdev->dev in favour of the local dev
variable.

Thierry


Attachments:
(No filename) (799.00 B)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:29:33

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 26/42] drivers: gpio: rcar: pendantic formatting

On Mon, Mar 11, 2019 at 07:55:05PM +0100, Enrico Weigelt, metux IT consult wrote:
> a tab sneaked in, where it shouldn't be.

Pedantic nitpick: "pendantic" -> "pedantic" in the subject, and start
the commit message with a capital letter: "A tab sneaked in [...]".

Thierry


Attachments:
(No filename) (280.00 B)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:32:00

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 33/42] drivers: gpio: tegra: use devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:55:12PM +0100, 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 <[email protected]>
> ---
> drivers/gpio/gpio-tegra.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (412.00 B)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:38:20

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 38/42] drivers: gpio: vr41xx: use devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:55:17PM +0100, Enrico Weigelt, metux IT consult wrote:
> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> this driver deserves a bit more cleanup, to get rid of the global
> variable giu_base, which makes it single-instance-only.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
> ---
> drivers/gpio/gpio-vr41xx.c | 19 +++++--------------
> 1 file changed, 5 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c
> index b13a49c..98cd715 100644
> --- a/drivers/gpio/gpio-vr41xx.c
> +++ b/drivers/gpio/gpio-vr41xx.c
> @@ -467,10 +467,9 @@ static int vr41xx_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
>
> static int giu_probe(struct platform_device *pdev)
> {
> - struct resource *res;
> unsigned int trigger, i, pin;
> struct irq_chip *chip;
> - int irq, ret;
> + int irq;
>
> switch (pdev->id) {
> case GPIO_50PINS_PULLUPDOWN:
> @@ -489,21 +488,14 @@ static int giu_probe(struct platform_device *pdev)
> return -ENODEV;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -EBUSY;
> -
> - giu_base = ioremap(res->start, resource_size(res));
> - if (!giu_base)
> - return -ENOMEM;
> + giu_base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(giu_base))
> + return PTR_ERR(giu_base);

The driver currently doesn't request the memory described in the
resource, so technically you're changing behaviour here and with your
change the driver could now fail if somebody else has already claimed
the memory.

Looking at arch/mips/vr41xx there doesn't seem to be an overlap between
the memory region used by the GIU device and any others, so this should
be safe. Not sure anyone still has hardware for this around to give it
a spin.

Thierry

>
> vr41xx_gpio_chip.parent = &pdev->dev;
>
> - ret = gpiochip_add_data(&vr41xx_gpio_chip, NULL);
> - if (!ret) {
> - iounmap(giu_base);
> + if (gpiochip_add_data(&vr41xx_gpio_chip, NULL))
> return -ENODEV;
> - }
>
> giu_write(GIUINTENL, 0);
> giu_write(GIUINTENH, 0);
> @@ -534,7 +526,6 @@ static int giu_probe(struct platform_device *pdev)
> static int giu_remove(struct platform_device *pdev)
> {
> if (giu_base) {
> - iounmap(giu_base);
> giu_base = NULL;
> }
>
> --
> 1.9.1
>


Attachments:
(No filename) (2.41 kB)
signature.asc (849.00 B)
Download all attachments

2019-03-12 11:39:35

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH 42/42] drivers: gpio: use devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:55:21PM +0100, 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 <[email protected]>
> ---
> drivers/gpio/gpio-zynq.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Subject prefix doesn't seem to match for this driver.

Thierry


Attachments:
(No filename) (430.00 B)
signature.asc (849.00 B)
Download all attachments

2019-03-12 13:46:02

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH] drivers: gpio: octeon: use devm_platform_ioremap_resource()

pon., 11 mar 2019 o 20:48 Enrico Weigelt, metux IT consult
<[email protected]> napisał(a):
>
> 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 <[email protected]>
> ---
> drivers/gpio/gpio-octeon.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
> index 1b19c88..afb0e8a 100644
> --- a/drivers/gpio/gpio-octeon.c
> +++ b/drivers/gpio/gpio-octeon.c
> @@ -82,7 +82,6 @@ static int octeon_gpio_probe(struct platform_device *pdev)
> {
> struct octeon_gpio *gpio;
> struct gpio_chip *chip;
> - struct resource *res_mem;
> void __iomem *reg_base;
> int err = 0;
>
> @@ -91,8 +90,7 @@ static int octeon_gpio_probe(struct platform_device *pdev)
> return -ENOMEM;
> chip = &gpio->chip;
>
> - res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
> + reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(reg_base))
> return PTR_ERR(reg_base);
>
> --
> 1.9.1
>

Can you make this a part of the bigger series and resend together with
subject line fixes?

Also: maybe consider adding a coccinelle script for that. When I added
that function I noticed there are 1200+ instances in the kernel that
need fixing. I think we'll be better off automating it.

Bart

Subject: Re: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

On 12.03.19 12:26, Thierry Reding wrote:
> You're not consistent within the series itself. In patch 3 you went the
> other way and dropped usage of pdev->dev in favour of the local dev
> variable.

ups, you got me :O


--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

Subject: Re: [PATCH] drivers: gpio: octeon: use devm_platform_ioremap_resource()

On 12.03.19 14:45, Bartosz Golaszewski wrote:

> Can you make this a part of the bigger series and resend together with
> subject line fixes?

tried to resend it as reply on the prev version. but somehow this
didn't seem to work as intented.

> Also: maybe consider adding a coccinelle script for that. When I added
> that function I noticed there are 1200+ instances in the kernel that
> need fixing. I think we'll be better off automating it.

haven't coped w/ this yet ... I'll first need to have a deeper look
at it. advices welcomed.


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

Subject: Re: [PATCH 38/42] drivers: gpio: vr41xx: use devm_platform_ioremap_resource()

On 12.03.19 12:37, Thierry Reding wrote:

> The driver currently doesn't request the memory described in the
> resource, so technically you're changing behaviour here and with your
> change the driver could now fail if somebody else has already claimed
> the memory.

hmm, using w/o requesting/claiming - isn't that a bug ?


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

2019-03-12 16:03:54

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 38/42] drivers: gpio: vr41xx: use devm_platform_ioremap_resource()



On 3/12/2019 8:42 AM, Enrico Weigelt, metux IT consult wrote:
> On 12.03.19 12:37, Thierry Reding wrote:
>
>> The driver currently doesn't request the memory described in the
>> resource, so technically you're changing behaviour here and with your
>> change the driver could now fail if somebody else has already claimed
>> the memory.
>
> hmm, using w/o requesting/claiming - isn't that a bug ?

Not necessarily, before regmap existed, you could have very well
delegated a subset of a larger resource to a specific driver while a
driver requesting that larger resource would be responsible for doing
the request_mem_region(). As long as both drivers don't stomp on each
other, this is a perfectly valid way to delegate, yet keep things
modular/separate.
--
Florian

2019-03-12 19:02:09

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 27/42] drivers: gpio: rcar: use devm_platform_ioremap_resource()

CC linux-renesas-soc

On Mon, Mar 11, 2019 at 7:58 PM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -430,7 +430,7 @@ static int gpio_rcar_parse_dt(struct gpio_rcar_priv *p, unsigned int *npins)
> static int gpio_rcar_probe(struct platform_device *pdev)
> {
> struct gpio_rcar_priv *p;
> - struct resource *io, *irq;
> + struct resource *irq;
> struct gpio_chip *gpio_chip;
> struct irq_chip *irq_chip;
> struct device *dev = &pdev->dev;
> @@ -461,8 +461,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
> goto err0;
> }
>
> - io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - p->base = devm_ioremap_resource(dev, io);
> + p->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(p->base)) {
> ret = PTR_ERR(p->base);
> goto err0;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2019-03-12 19:05:54

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 26/42] drivers: gpio: rcar: pendantic formatting

CC linux-renesas-soc

On Mon, Mar 11, 2019 at 7:57 PM Enrico Weigelt, metux IT consult
<[email protected]> wrote:
> a tab sneaked in, where it shouldn't be.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

With Thierry's comments addressed:
Reviewed-by: Geert Uytterhoeven <[email protected]>

> --- a/drivers/gpio/gpio-rcar.c
> +++ b/drivers/gpio/gpio-rcar.c
> @@ -490,7 +490,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
> irq_chip->irq_unmask = gpio_rcar_irq_enable;
> irq_chip->irq_set_type = gpio_rcar_irq_set_type;
> irq_chip->irq_set_wake = gpio_rcar_irq_set_wake;
> - irq_chip->flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_MASK_ON_SUSPEND;
> + irq_chip->flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_MASK_ON_SUSPEND;
>
> ret = gpiochip_add_data(gpio_chip, p);
> if (ret) {

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2019-03-14 10:45:12

by Grygorii Strashko

[permalink] [raw]
Subject: Re: [PATCH] drivers: gpio: omap: use devm_platform_ioremap_resource()



On 11.03.19 21:50, 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 <[email protected]>
> ---
> drivers/gpio/gpio-omap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index 7f33024..ce6e67a 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1289,7 +1289,6 @@ static int omap_gpio_probe(struct platform_device *pdev)
> struct device_node *node = dev->of_node;
> const struct of_device_id *match;
> const struct omap_gpio_platform_data *pdata;
> - struct resource *res;
> struct gpio_bank *bank;
> struct irq_chip *irqc;
> int ret;
> @@ -1375,8 +1374,7 @@ static int omap_gpio_probe(struct platform_device *pdev)
> raw_spin_lock_init(&bank->wa_lock);
>
> /* Static mapping, never released */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - bank->base = devm_ioremap_resource(dev, res);
> + bank->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(bank->base)) {
> return PTR_ERR(bank->base);
> }
>

Acked-by: Grygorii Strashko <[email protected]>

--
Best regards,
grygorii

2019-03-15 08:22:03

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 05/42] drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()

On Mon, Mar 11, 2019 at 07:54:44PM +0100, 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 <[email protected]>
> ---
> drivers/gpio/gpio-bcm-kona.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
> index c5536a5..9fa6d3a 100644
> --- a/drivers/gpio/gpio-bcm-kona.c
> +++ b/drivers/gpio/gpio-bcm-kona.c
> @@ -568,7 +568,6 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> const struct of_device_id *match;
> - struct resource *res;
> struct bcm_kona_gpio_bank *bank;
> struct bcm_kona_gpio *kona_gpio;
> struct gpio_chip *chip;
> @@ -618,8 +617,7 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
> return -ENXIO;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - kona_gpio->reg_base = devm_ioremap_resource(dev, res);
> + kona_gpio->reg_base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(kona_gpio->reg_base)) {
> ret = -ENXIO;

This should be

ret = PTR_ERR(kona_gpio->reg_base)

, shouldn't it? (If yes, this is orthogonal to this patch, but still
worth fixing.)

@Julia: Is this something that coccinelle could catch?

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

2019-04-02 08:05:51

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 01/42] drivers: gpio: 74xx-mmio: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 08:07:40

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 02/42] drivers: gpio: amdpt: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 09:06:05

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 07/42] drivers: gpio: clps711x: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 09:07:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Baolin's ACK.

Yours,
Linus Walleij

2019-04-02 09:13:30

by Baolin Wang

[permalink] [raw]
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

Hi Linus,

On Tue, 2 Apr 2019 at 17:04, Linus Walleij <[email protected]> wrote:
>
> On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
> <[email protected]> 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 <[email protected]>
>
> Patch applied with Baolin's ACK.

This patch had some problems which I've pointed out and I did not ack
this patch. Please do not apply it now until fixing the problem.

--
Baolin Wang
Best Regards

2019-04-02 09:31:12

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 04/42] drivers: gpio: aspeed: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 2:00 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 09:31:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 05/42] drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Florian's ACK.

Yours,
Linus Walleij

2019-04-02 09:32:31

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 06/42] drivers: gpio: cadence: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 09:32:49

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 08/42] drivers: gpio: dwap: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-02 09:39:26

by Baolin Wang

[permalink] [raw]
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On Tue, 2 Apr 2019 at 17:19, Linus Walleij <[email protected]> wrote:
>
> On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <[email protected]> wrote:
> > On Tue, 2 Apr 2019 at 17:04, Linus Walleij <[email protected]> wrote:
> > >
> > > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
> > > <[email protected]> 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 <[email protected]>
> > >
> > > Patch applied with Baolin's ACK.
> >
> > This patch had some problems which I've pointed out and I did not ack
> > this patch. Please do not apply it now until fixing the problem.
>
> Sorry, it's the gmail threading that confuse the different patches.
>
> The patch I actually applied is for gpio-sprd.c and looks like this:

Yes, this one is correct. Thanks :)

>
> commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel)
> Author: Enrico Weigelt, metux IT consult <[email protected]>
> Date: Mon Mar 11 19:55:08 2019 +0100
>
> drivers: gpio: sprd: use devm_platform_ioremap_resource()
>
> 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 <[email protected]>
> Reviewed-by: Baolin Wang <[email protected]>
> Signed-off-by: Linus Walleij <[email protected]>
>
> diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
> index 55072d2b367f..f5c8b3a351d5 100644
> --- a/drivers/gpio/gpio-sprd.c
> +++ b/drivers/gpio/gpio-sprd.c
> @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> {
> struct gpio_irq_chip *irq;
> struct sprd_gpio *sprd_gpio;
> - struct resource *res;
> int ret;
>
> sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
> @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
> return sprd_gpio->irq;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
> + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sprd_gpio->base))
> return PTR_ERR(sprd_gpio->base);
>
> Yours,
> Linus Walleij



--
Baolin Wang
Best Regards

2019-04-02 09:40:09

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 09/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>
> ---
> drivers/gpio/gpio-eic-sprd.c | 9 ++-------

Please fix the subject of this patch to gpio: eic-sprd: because
gmail goes bananas with things that have the same subject line.

Yours,
Linus Walleij

2019-04-02 10:22:27

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 03/42] drivers: gpio: amdpt: drop unneeded deref of &pdev->dev

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> wrote:

> We already have the struct device* pointer in a local variable,
> so we can write this a bit shorter.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

Thierry seems to have spotted a bug in this patch so please
resend it fixed (I will apply some others though so no need to resend
all).

Yours,
Linus Walleij

2019-04-02 10:33:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 29/42] drivers: gpio: sprd: use devm_platform_ioremap_resource()

On Tue, Apr 2, 2019 at 4:10 PM Baolin Wang <[email protected]> wrote:
> On Tue, 2 Apr 2019 at 17:04, Linus Walleij <[email protected]> wrote:
> >
> > On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
> > <[email protected]> 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 <[email protected]>
> >
> > Patch applied with Baolin's ACK.
>
> This patch had some problems which I've pointed out and I did not ack
> this patch. Please do not apply it now until fixing the problem.

Sorry, it's the gmail threading that confuse the different patches.

The patch I actually applied is for gpio-sprd.c and looks like this:

commit 851f66daeab961328507dcce0980cd7e4ff5f9ae (HEAD -> devel)
Author: Enrico Weigelt, metux IT consult <[email protected]>
Date: Mon Mar 11 19:55:08 2019 +0100

drivers: gpio: sprd: use devm_platform_ioremap_resource()

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 <[email protected]>
Reviewed-by: Baolin Wang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>

diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c
index 55072d2b367f..f5c8b3a351d5 100644
--- a/drivers/gpio/gpio-sprd.c
+++ b/drivers/gpio/gpio-sprd.c
@@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev)
{
struct gpio_irq_chip *irq;
struct sprd_gpio *sprd_gpio;
- struct resource *res;
int ret;

sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL);
@@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev)
return sprd_gpio->irq;
}

- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res);
+ sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sprd_gpio->base))
return PTR_ERR(sprd_gpio->base);

Yours,
Linus Walleij

2019-04-03 02:28:51

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 10/42] drivers: gpio: ep93xx: devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Skipping this patch for now because of the bug pointed out by Thierry,
BTW rebase on my GPIO "devel" branch after I applied the
uncontroversial patches (most of them are obviously correct).

I know it is not super easy to build all of those systems so cold
coding is fine with me, I will find any remaining bugs for sure. :D

Yours,
Linus Walleij

2019-04-03 02:30:58

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 11/42] drivers: gpio: ftgpio010: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 02:31:41

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 12/42] drivers: gpio: grgpio: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Holding this one back so you can fix the bug pointed out by Thierry.

Yours,
Linus Walleij

2019-04-03 02:31:52

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 13/42] drivers: gpio: hlwd: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Yours,
Linus Walleij

2019-04-03 02:32:45

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 14/42] drivers: gpio: iop: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 02:33:37

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 15/42] drivers: gpio: janz-ttl: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 02:35:07

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 16/42] drivers: gpio: janz-ttl: drop unneccessary temp variable dev

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> wrote:

> don't need the temporary variable "dev", directly use &pdev->dev
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

Dropping this patch following the discussion. I like it better as it is :D

Yours,
Linus Walleij

2019-04-03 02:36:09

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 17/42] drivers: gpio: loongon1: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 02:38:32

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 18/42] drivers: gpio: lpc18xx: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 02:39:02

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 19/42] drivers: gpio: mb86s7x: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:01:37

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 20/42] drivers: gpio: mt7621: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:59 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Matthias' ACK.

Yours,
Linus Walleij

2019-04-03 03:04:10

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 21/42] drivers: gpio: mvebu: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:05:36

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 22/42] drivers: gpio: mxc: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:10:26

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] drivers: gpio: omap: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 2:50 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Grygorii's ACK.

Yours,
Linus Walleij

2019-04-03 03:32:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 25/42] drivers: gpio: pxa: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:32:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] drivers: gpio: octeon: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 2:48 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:35:04

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 26/42] drivers: gpio: rcar: pendantic formatting

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> wrote:

> a tab sneaked in, where it shouldn't be.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

Waiting for a new version of this patch.

Yours,
Linus Walleij

2019-04-03 03:35:28

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 27/42] drivers: gpio: rcar: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:58 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Geert's review.

Yours,
Linus Walleij

2019-04-03 03:36:46

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 28/42] drivers: gpio: spear-spics: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:43:14

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 30/42] drivers: gpio: sta2x11: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:44:36

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 31/42] drivers: gpio: stp-xway: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:45:52

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 32/42] drivers: gpio: tb10x: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:55 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:47:30

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 33/42] drivers: gpio: tegra: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Thierry's ACK.

Yours,
Linus Walleij

2019-04-03 03:49:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 34/42] drivers: gpio: timberdale: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:49:43

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 35/42] drivers: gpio: ts4800: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:50:55

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 36/42] drivers: gpio: uniphier: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:57 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied with Masahiro's ACK.

Yours,
Linus Walleij

2019-04-03 03:53:05

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 38/42] drivers: gpio: vr41xx: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> wrote:

> Use the new helper that wraps the calls to platform_get_resource()
> and devm_ioremap_resource() together.
>
> this driver deserves a bit more cleanup, to get rid of the global
> variable giu_base, which makes it single-instance-only.
>
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>

Holding this back until we have more consensus and some ACKs.

Yours,
Linus Walleij

2019-04-03 03:53:11

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 37/42] drivers: gpio: vf610: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:54:03

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 39/42] drivers: gpio: xgene-sb: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:55:06

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 40/42] drivers: gpio: zx: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:56:12

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 41/42] drivers: gpio: xlp: devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Patch applied.

Yours,
Linus Walleij

2019-04-03 03:58:13

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 42/42] drivers: gpio: use devm_platform_ioremap_resource()

On Tue, Mar 12, 2019 at 1:56 AM Enrico Weigelt, metux IT consult
<[email protected]> 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 <[email protected]>

Changed subject to gpio: zynq: and applied.

Yours,
Linus Walleij