linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-24-git-send-email-wsa@the-dreams.de>
@ 2013-05-10 10:55   ` Mark Brown
  2013-05-10 16:37   ` Stephen Warren
  2013-05-11  5:24   ` Jingoo Han
  2 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2013-05-10 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 10:17:08AM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130510/c2f62849/attachment.sig>

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

* [RFC 18/42] drivers/pinctrl: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-19-git-send-email-wsa@the-dreams.de>
@ 2013-05-10 14:30   ` Jean-Christophe PLAGNIOL-VILLARD
  2013-05-14 12:19   ` Linus Walleij
  2013-06-06  8:43   ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-05-10 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 10:17 Fri 10 May     , Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/pinctrl/pinctrl-at91.c       |    7 +------
for at91
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

>  drivers/pinctrl/pinctrl-coh901.c     |    5 -----
>  drivers/pinctrl/pinctrl-exynos5440.c |    5 -----
>  drivers/pinctrl/pinctrl-samsung.c    |    5 -----
>  drivers/pinctrl/pinctrl-xway.c       |    4 ----
>  5 files changed, 1 insertion(+), 25 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 5d7529e..b90a3a0 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1543,12 +1543,6 @@ static int at91_gpio_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		ret = -ENOENT;
> -		goto err;
> -	}
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		ret = irq;
> @@ -1561,6 +1555,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(at91_chip->regbase)) {
>  		ret = PTR_ERR(at91_chip->regbase);
> diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
> index edde3ac..a67af41 100644
> --- a/drivers/pinctrl/pinctrl-coh901.c
> +++ b/drivers/pinctrl/pinctrl-coh901.c
> @@ -713,11 +713,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
>  	gpio->dev = &pdev->dev;
>  
>  	memres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!memres) {
> -		dev_err(gpio->dev, "could not get GPIO memory resource\n");
> -		return -ENODEV;
> -	}
> -
>  	gpio->base = devm_ioremap_resource(&pdev->dev, memres);
>  	if (IS_ERR(gpio->base))
>  		return PTR_ERR(gpio->base);
> diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
> index 6038503..32a48f4 100644
> --- a/drivers/pinctrl/pinctrl-exynos5440.c
> +++ b/drivers/pinctrl/pinctrl-exynos5440.c
> @@ -1000,11 +1000,6 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev)
>  	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>  	priv->reg_base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->reg_base))
>  		return PTR_ERR(priv->reg_base);
> diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
> index 9763668..055d016 100644
> --- a/drivers/pinctrl/pinctrl-samsung.c
> +++ b/drivers/pinctrl/pinctrl-samsung.c
> @@ -932,11 +932,6 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
>  	drvdata->dev = dev;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>  	drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(drvdata->virt_base))
>  		return PTR_ERR(drvdata->virt_base);
> diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
> index f2977cf..e92132c 100644
> --- a/drivers/pinctrl/pinctrl-xway.c
> +++ b/drivers/pinctrl/pinctrl-xway.c
> @@ -716,10 +716,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
>  
>  	/* get and remap our register range */
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get resource\n");
> -		return -ENOENT;
> -	}
>  	xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(xway_info.membase[0]))
>  		return PTR_ERR(xway_info.membase[0]);
> -- 
> 1.7.10.4
> 

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

* [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-24-git-send-email-wsa@the-dreams.de>
  2013-05-10 10:55   ` [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource Mark Brown
@ 2013-05-10 16:37   ` Stephen Warren
  2013-05-11  5:24   ` Jingoo Han
  2 siblings, 0 replies; 14+ messages in thread
From: Stephen Warren @ 2013-05-10 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

On 05/10/2013 02:17 AM, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

> diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c

> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!r) {
> -		dev_err(&pdev->dev, "No IO memory resource\n");
> -		ret = -ENODEV;
> -		goto exit_free_master;
> -	}
>  	tspi->phys = r->start;
> +	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);

The tspi->phy assignment is broken there now.

> diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c

> -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!r) {
> -		dev_err(&pdev->dev, "No IO memory resource\n");
> -		ret = -ENODEV;
> -		goto exit_free_master;
> -	}
>  	tspi->phys = r->start;
> +	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);

Same here.

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

* [RFC 38/42] arch/arm/plat-omap: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-39-git-send-email-wsa@the-dreams.de>
@ 2013-05-10 16:46   ` Tony Lindgren
  0 siblings, 0 replies; 14+ messages in thread
From: Tony Lindgren @ 2013-05-10 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

* Wolfram Sang <wsa@the-dreams.de> [130510 01:23]:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Tony Lindgren <tony@atomide.com>

> ---
>  arch/arm/plat-omap/dmtimer.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 869254c..da1a3f7 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -814,12 +814,6 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (unlikely(!mem)) {
> -		dev_err(dev, "%s: no memory resource.\n", __func__);
> -		return -ENODEV;
> -	}
> -
>  	timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL);
>  	if (!timer) {
>  		dev_err(dev, "%s: memory alloc failed!\n", __func__);
> @@ -827,6 +821,7 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>  	}
>  
>  	timer->fclk = ERR_PTR(-ENODEV);
> +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	timer->io_base = devm_ioremap_resource(dev, mem);
>  	if (IS_ERR(timer->io_base))
>  		return PTR_ERR(timer->io_base);
> -- 
> 1.7.10.4
> 

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

* [RFC 39/42] arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-40-git-send-email-wsa@the-dreams.de>
@ 2013-05-11  5:15   ` Jingoo Han
  0 siblings, 0 replies; 14+ messages in thread
From: Jingoo Han @ 2013-05-11  5:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, May 10, 2013 5:17 PM, Wolfram Sang wrote:
> 
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  arch/arm/plat-samsung/adc.c |    5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
> index ca07cb1..79690f2 100644
> --- a/arch/arm/plat-samsung/adc.c
> +++ b/arch/arm/plat-samsung/adc.c
> @@ -381,11 +381,6 @@ static int s3c_adc_probe(struct platform_device *pdev)
>  	}
> 
>  	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!regs) {
> -		dev_err(dev, "failed to find registers\n");
> -		return -ENXIO;
> -	}
> -
>  	adc->regs = devm_ioremap_resource(dev, regs);
>  	if (IS_ERR(adc->regs))
>  		return PTR_ERR(adc->regs);
> --
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [RFC 09/42] drivers/i2c/busses: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-10-git-send-email-wsa@the-dreams.de>
@ 2013-05-11  5:18   ` Jingoo Han
  2013-06-04 18:34   ` Kevin Hilman
  1 sibling, 0 replies; 14+ messages in thread
From: Jingoo Han @ 2013-05-11  5:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, May 10, 2013 5:17 PM, Wolfram Sang wrote:
> 
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/i2c/busses/i2c-davinci.c            |    6 +-----
>  drivers/i2c/busses/i2c-designware-platdrv.c |    6 +-----
>  drivers/i2c/busses/i2c-imx.c                |    6 +-----
>  drivers/i2c/busses/i2c-omap.c               |    6 +-----
>  drivers/i2c/busses/i2c-rcar.c               |    7 +------
>  drivers/i2c/busses/i2c-s3c2410.c            |    5 -----

For drivers/i2c/busses/i2c-s3c2410.c

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han


>  drivers/i2c/busses/i2c-sirf.c               |    6 ------
>  drivers/i2c/busses/i2c-tegra.c              |    5 -----
>  8 files changed, 5 insertions(+), 42 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index cf20e06..2ed3e7b 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -647,11 +647,6 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>  	int r;
> 
>  	/* NOTE: driver uses the static register mapping */
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!mem) {
> -		dev_err(&pdev->dev, "no mem resource?\n");
> -		return -ENODEV;
> -	}
> 
>  	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>  	if (!irq) {
> @@ -697,6 +692,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	clk_prepare_enable(dev->clk);
> 
> +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	dev->base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(dev->base)) {
>  		r = PTR_ERR(dev->base);
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 8ec9133..6f3c612 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -87,11 +87,6 @@ static int dw_i2c_probe(struct platform_device *pdev)
>  	int irq, r;
> 
>  	/* NOTE: driver uses the static register mapping */
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!mem) {
> -		dev_err(&pdev->dev, "no mem resource?\n");
> -		return -EINVAL;
> -	}
> 
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> @@ -103,6 +98,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
>  	if (!dev)
>  		return -ENOMEM;
> 
> +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	dev->base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(dev->base))
>  		return PTR_ERR(dev->base);
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index 82f20c6..b274ca1 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -500,17 +500,13 @@ static int __init i2c_imx_probe(struct platform_device *pdev)
> 
>  	dev_dbg(&pdev->dev, "<%s>\n", __func__);
> 
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "can't get device resources\n");
> -		return -ENOENT;
> -	}
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		dev_err(&pdev->dev, "can't get irq number\n");
>  		return -ENOENT;
>  	}
> 
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index e02f9e3..8498ab7 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1085,11 +1085,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  	u16 minor, major, scheme;
> 
>  	/* NOTE: driver uses the static register mapping */
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!mem) {
> -		dev_err(&pdev->dev, "no mem resource?\n");
> -		return -ENODEV;
> -	}
> 
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> @@ -1103,6 +1098,7 @@ omap_i2c_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  	}
> 
> +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	dev->base = devm_ioremap_resource(&pdev->dev, mem);
>  	if (IS_ERR(dev->base))
>  		return PTR_ERR(dev->base);
> diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
> index 4ba4a95..0fc5858 100644
> --- a/drivers/i2c/busses/i2c-rcar.c
> +++ b/drivers/i2c/busses/i2c-rcar.c
> @@ -623,12 +623,6 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>  	u32 bus_speed;
>  	int ret;
> 
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "no mmio resources\n");
> -		return -ENODEV;
> -	}
> -
>  	priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
>  	if (!priv) {
>  		dev_err(dev, "no mem for private data\n");
> @@ -642,6 +636,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>  	if (ret < 0)
>  		return ret;
> 
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	priv->io = devm_ioremap_resource(dev, res);
>  	if (IS_ERR(priv->io))
>  		return PTR_ERR(priv->io);
> diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
> index 6e8ee92..cab1c91 100644
> --- a/drivers/i2c/busses/i2c-s3c2410.c
> +++ b/drivers/i2c/busses/i2c-s3c2410.c
> @@ -1082,11 +1082,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>  	/* map the registers */
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (res == NULL) {
> -		dev_err(&pdev->dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>  	i2c->regs = devm_ioremap_resource(&pdev->dev, res);
> 
>  	if (IS_ERR(i2c->regs))
> diff --git a/drivers/i2c/busses/i2c-sirf.c b/drivers/i2c/busses/i2c-sirf.c
> index 5a7ad24..a63c7d5 100644
> --- a/drivers/i2c/busses/i2c-sirf.c
> +++ b/drivers/i2c/busses/i2c-sirf.c
> @@ -303,12 +303,6 @@ static int i2c_sirfsoc_probe(struct platform_device *pdev)
>  	adap->class = I2C_CLASS_HWMON;
> 
>  	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (mem_res == NULL) {
> -		dev_err(&pdev->dev, "Unable to get MEM resource\n");
> -		err = -EINVAL;
> -		goto out;
> -	}
> -
>  	siic->base = devm_ioremap_resource(&pdev->dev, mem_res);
>  	if (IS_ERR(siic->base)) {
>  		err = PTR_ERR(siic->base);
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index b60ff90..9aa1b60 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -714,11 +714,6 @@ static int tegra_i2c_probe(struct platform_device *pdev)
>  	int ret = 0;
> 
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "no mem resource\n");
> -		return -EINVAL;
> -	}
> -
>  	base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(base))
>  		return PTR_ERR(base);
> --
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-24-git-send-email-wsa@the-dreams.de>
  2013-05-10 10:55   ` [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource Mark Brown
  2013-05-10 16:37   ` Stephen Warren
@ 2013-05-11  5:24   ` Jingoo Han
  2 siblings, 0 replies; 14+ messages in thread
From: Jingoo Han @ 2013-05-11  5:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, May 10, 2013 5:17 PM, Wolfram Sang wrote:
> 
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/spi/spi-bcm63xx.c        |    8 +-------
>  drivers/spi/spi-ep93xx.c         |    8 +-------
>  drivers/spi/spi-omap2-mcspi.c    |    7 +------
>  drivers/spi/spi-s3c64xx.c        |    7 +------
>  drivers/spi/spi-sirf.c           |    7 +------
>  drivers/spi/spi-tegra114.c       |    7 +------
>  drivers/spi/spi-tegra20-sflash.c |    5 -----
>  drivers/spi/spi-tegra20-slink.c  |    7 +------
>  8 files changed, 7 insertions(+), 49 deletions(-)
> 

[.....]

> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 5000586..fd763cc 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -1243,12 +1243,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
>  		return -ENODEV;
>  	}
> 
> -	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (mem_res == NULL) {
> -		dev_err(&pdev->dev, "Unable to get SPI MEM resource\n");
> -		return -ENXIO;
> -	}
> -

It breaks 'sdd->sfr_start' assignment as below:

1272         sdd->sfr_start = mem_res->start;


Best regards,
Jingoo Han

>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		dev_warn(&pdev->dev, "Failed to get IRQ: %d\n", irq);
> @@ -1318,6 +1312,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
>  	/* the spi->mode bits understood by this driver: */
>  	master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
> 
> +	mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	sdd->regs = devm_ioremap_resource(&pdev->dev, mem_res);
>  	if (IS_ERR(sdd->regs)) {
>  		ret = PTR_ERR(sdd->regs);

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

* [RFC 19/42] drivers/pinctrl/spear: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-20-git-send-email-wsa@the-dreams.de>
@ 2013-05-12 15:10   ` Viresh Kumar
  2013-05-14 12:56   ` Linus Walleij
  1 sibling, 0 replies; 14+ messages in thread
From: Viresh Kumar @ 2013-05-12 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 1:47 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/pinctrl/spear/pinctrl-plgpio.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 3e5a887..6b090be 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -528,18 +528,13 @@ static int plgpio_probe(struct platform_device *pdev)
>         struct resource *res;
>         int ret, irq, i;
>
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       if (!res) {
> -               dev_err(&pdev->dev, "invalid IORESOURCE_MEM\n");
> -               return -EBUSY;
> -       }
> -
>         plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
>         if (!plgpio) {
>                 dev_err(&pdev->dev, "memory allocation fail\n");
>                 return -ENOMEM;
>         }
>
> +       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>         plgpio->base = devm_ioremap_resource(&pdev->dev, res);
>         if (IS_ERR(plgpio->base))
>                 return PTR_ERR(plgpio->base);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* [RFC 22/42] drivers/rtc: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-23-git-send-email-wsa@the-dreams.de>
@ 2013-05-12 15:11   ` Viresh Kumar
  0 siblings, 0 replies; 14+ messages in thread
From: Viresh Kumar @ 2013-05-12 15:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 1:47 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/rtc/rtc-spear.c  |    7 +------

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* [RFC 20/42] drivers/pwm: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-21-git-send-email-wsa@the-dreams.de>
@ 2013-05-12 15:12   ` Viresh Kumar
  0 siblings, 0 replies; 14+ messages in thread
From: Viresh Kumar @ 2013-05-12 15:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 1:47 PM, Wolfram Sang <wsa@the-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/pwm/pwm-spear.c    |    7 +------

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* [RFC 18/42] drivers/pinctrl: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-19-git-send-email-wsa@the-dreams.de>
  2013-05-10 14:30   ` [RFC 18/42] drivers/pinctrl: " Jean-Christophe PLAGNIOL-VILLARD
@ 2013-05-14 12:19   ` Linus Walleij
  2013-06-06  8:43   ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2013-05-14 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 10:17 AM, Wolfram Sang <wsa@the-dreams.de> wrote:

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Patch applied with Jean-Christophe's ACK.

Thanks!
Linus Walleij

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

* [RFC 19/42] drivers/pinctrl/spear: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-20-git-send-email-wsa@the-dreams.de>
  2013-05-12 15:10   ` [RFC 19/42] drivers/pinctrl/spear: " Viresh Kumar
@ 2013-05-14 12:56   ` Linus Walleij
  1 sibling, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2013-05-14 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, May 10, 2013 at 10:17 AM, Wolfram Sang <wsa@the-dreams.de> wrote:

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Patch applied with Viresh's ACK.

Thanks!
Linus Walleij

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

* [RFC 09/42] drivers/i2c/busses: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-10-git-send-email-wsa@the-dreams.de>
  2013-05-11  5:18   ` [RFC 09/42] drivers/i2c/busses: " Jingoo Han
@ 2013-06-04 18:34   ` Kevin Hilman
  1 sibling, 0 replies; 14+ messages in thread
From: Kevin Hilman @ 2013-06-04 18:34 UTC (permalink / raw)
  To: linux-arm-kernel

Wolfram Sang <wsa@the-dreams.de> writes:

> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

Acked-by: Kevin Hilman <khilman@linaro.org>  # for i2c-omap.c

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

* [RFC 18/42] drivers/pinctrl: don't check resource with devm_ioremap_resource
       [not found] ` <1368173847-5661-19-git-send-email-wsa@the-dreams.de>
  2013-05-10 14:30   ` [RFC 18/42] drivers/pinctrl: " Jean-Christophe PLAGNIOL-VILLARD
  2013-05-14 12:19   ` Linus Walleij
@ 2013-06-06  8:43   ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 14+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

On 10:17 Fri 10 May     , Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
> 
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> ---
>  drivers/pinctrl/pinctrl-at91.c       |    7 +------
for at91

Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.
>  drivers/pinctrl/pinctrl-coh901.c     |    5 -----
>  drivers/pinctrl/pinctrl-exynos5440.c |    5 -----
>  drivers/pinctrl/pinctrl-samsung.c    |    5 -----
>  drivers/pinctrl/pinctrl-xway.c       |    4 ----
>  5 files changed, 1 insertion(+), 25 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> index 5d7529e..b90a3a0 100644
> --- a/drivers/pinctrl/pinctrl-at91.c
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -1543,12 +1543,6 @@ static int at91_gpio_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		ret = -ENOENT;
> -		goto err;
> -	}
> -
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
>  		ret = irq;
> @@ -1561,6 +1555,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	at91_chip->regbase = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(at91_chip->regbase)) {
>  		ret = PTR_ERR(at91_chip->regbase);
> diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
> index edde3ac..a67af41 100644
> --- a/drivers/pinctrl/pinctrl-coh901.c
> +++ b/drivers/pinctrl/pinctrl-coh901.c
> @@ -713,11 +713,6 @@ static int __init u300_gpio_probe(struct platform_device *pdev)
>  	gpio->dev = &pdev->dev;
>  
>  	memres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!memres) {
> -		dev_err(gpio->dev, "could not get GPIO memory resource\n");
> -		return -ENODEV;
> -	}
> -
>  	gpio->base = devm_ioremap_resource(&pdev->dev, memres);
>  	if (IS_ERR(gpio->base))
>  		return PTR_ERR(gpio->base);
> diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c
> index 6038503..32a48f4 100644
> --- a/drivers/pinctrl/pinctrl-exynos5440.c
> +++ b/drivers/pinctrl/pinctrl-exynos5440.c
> @@ -1000,11 +1000,6 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev)
>  	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>  	priv->reg_base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(priv->reg_base))
>  		return PTR_ERR(priv->reg_base);
> diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c
> index 9763668..055d016 100644
> --- a/drivers/pinctrl/pinctrl-samsung.c
> +++ b/drivers/pinctrl/pinctrl-samsung.c
> @@ -932,11 +932,6 @@ static int samsung_pinctrl_probe(struct platform_device *pdev)
>  	drvdata->dev = dev;
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(dev, "cannot find IO resource\n");
> -		return -ENOENT;
> -	}
> -
>  	drvdata->virt_base = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(drvdata->virt_base))
>  		return PTR_ERR(drvdata->virt_base);
> diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c
> index f2977cf..e92132c 100644
> --- a/drivers/pinctrl/pinctrl-xway.c
> +++ b/drivers/pinctrl/pinctrl-xway.c
> @@ -716,10 +716,6 @@ static int pinmux_xway_probe(struct platform_device *pdev)
>  
>  	/* get and remap our register range */
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	if (!res) {
> -		dev_err(&pdev->dev, "Failed to get resource\n");
> -		return -ENOENT;
> -	}
>  	xway_info.membase[0] = devm_ioremap_resource(&pdev->dev, res);
>  	if (IS_ERR(xway_info.membase[0]))
>  		return PTR_ERR(xway_info.membase[0]);
> -- 
> 1.7.10.4
> 

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

end of thread, other threads:[~2013-06-06  8:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1368173847-5661-1-git-send-email-wsa@the-dreams.de>
     [not found] ` <1368173847-5661-24-git-send-email-wsa@the-dreams.de>
2013-05-10 10:55   ` [RFC 23/42] drivers/spi: don't check resource with devm_ioremap_resource Mark Brown
2013-05-10 16:37   ` Stephen Warren
2013-05-11  5:24   ` Jingoo Han
     [not found] ` <1368173847-5661-39-git-send-email-wsa@the-dreams.de>
2013-05-10 16:46   ` [RFC 38/42] arch/arm/plat-omap: " Tony Lindgren
     [not found] ` <1368173847-5661-40-git-send-email-wsa@the-dreams.de>
2013-05-11  5:15   ` [RFC 39/42] arch/arm/plat-samsung: " Jingoo Han
     [not found] ` <1368173847-5661-23-git-send-email-wsa@the-dreams.de>
2013-05-12 15:11   ` [RFC 22/42] drivers/rtc: " Viresh Kumar
     [not found] ` <1368173847-5661-21-git-send-email-wsa@the-dreams.de>
2013-05-12 15:12   ` [RFC 20/42] drivers/pwm: " Viresh Kumar
     [not found] ` <1368173847-5661-19-git-send-email-wsa@the-dreams.de>
2013-05-10 14:30   ` [RFC 18/42] drivers/pinctrl: " Jean-Christophe PLAGNIOL-VILLARD
2013-05-14 12:19   ` Linus Walleij
2013-06-06  8:43   ` Jean-Christophe PLAGNIOL-VILLARD
     [not found] ` <1368173847-5661-20-git-send-email-wsa@the-dreams.de>
2013-05-12 15:10   ` [RFC 19/42] drivers/pinctrl/spear: " Viresh Kumar
2013-05-14 12:56   ` Linus Walleij
     [not found] ` <1368173847-5661-10-git-send-email-wsa@the-dreams.de>
2013-05-11  5:18   ` [RFC 09/42] drivers/i2c/busses: " Jingoo Han
2013-06-04 18:34   ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).