linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-29 16:39   ` Linus Walleij
  2013-08-07 15:38   ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
  2 siblings, 2 replies; 6+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Please apply via the subsystem-tree.

 drivers/i2c/busses/i2c-stu300.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index d1a6b20..ded21cf 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -884,9 +884,6 @@ stu300_probe(struct platform_device *pdev)
 
 	dev->pdev = pdev;
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
 	dev->virtbase = devm_ioremap_resource(&pdev->dev, res);
 	dev_dbg(&pdev->dev, "initialize bus device I2C%d on virtual "
 		"base %p\n", bus_nr, dev->virtbase);
-- 
1.7.10.4

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

* [PATCH 20/27] drivers/watchdog: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Please apply via the subsystem-tree.

 drivers/watchdog/nuc900_wdt.c |    5 -----
 drivers/watchdog/ts72xx_wdt.c |   10 ----------
 2 files changed, 15 deletions(-)

diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c
index e2b6d2c..b15b6ef 100644
--- a/drivers/watchdog/nuc900_wdt.c
+++ b/drivers/watchdog/nuc900_wdt.c
@@ -256,11 +256,6 @@ static int nuc900wdt_probe(struct platform_device *pdev)
 	spin_lock_init(&nuc900_wdt->wdt_lock);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL) {
-		dev_err(&pdev->dev, "no memory resource specified\n");
-		return -ENOENT;
-	}
-
 	nuc900_wdt->wdt_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(nuc900_wdt->wdt_base))
 		return PTR_ERR(nuc900_wdt->wdt_base);
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c
index 4da59b4..42913f1 100644
--- a/drivers/watchdog/ts72xx_wdt.c
+++ b/drivers/watchdog/ts72xx_wdt.c
@@ -403,21 +403,11 @@ static int ts72xx_wdt_probe(struct platform_device *pdev)
 	}
 
 	r1 = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!r1) {
-		dev_err(&pdev->dev, "failed to get memory resource\n");
-		return -ENODEV;
-	}
-
 	wdt->control_reg = devm_ioremap_resource(&pdev->dev, r1);
 	if (IS_ERR(wdt->control_reg))
 		return PTR_ERR(wdt->control_reg);
 
 	r2 = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!r2) {
-		dev_err(&pdev->dev, "failed to get memory resource\n");
-		return -ENODEV;
-	}
-
 	wdt->feed_reg = devm_ioremap_resource(&pdev->dev, r2);
 	if (IS_ERR(wdt->feed_reg))
 		return PTR_ERR(wdt->feed_reg);
-- 
1.7.10.4

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

* [PATCH 24/27] sound/soc/pxa: don't check resource with devm_ioremap_resource
       [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
  2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
@ 2013-07-23 18:01 ` Wolfram Sang
  2013-07-24 14:35   ` Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2013-07-23 18:01 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Please apply via the subsystem-tree.

 sound/soc/pxa/mmp-sspa.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 62142ce..1605934 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -430,9 +430,6 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (res == NULL)
-		return -ENOMEM;
-
 	priv->sspa->mmio_base = devm_ioremap_resource(&pdev->dev, res);
 	if (IS_ERR(priv->sspa->mmio_base))
 		return PTR_ERR(priv->sspa->mmio_base);
-- 
1.7.10.4

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

* [PATCH 24/27] sound/soc/pxa: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
@ 2013-07-24 14:35   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-07-24 14:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 23, 2013 at 08:01:57PM +0200, Wolfram Sang wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.

Applied, thanks.
-------------- 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/20130724/721b0383/attachment-0001.sig>

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

* [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
@ 2013-07-29 16:39   ` Linus Walleij
  2013-08-07 15:38   ` Wolfram Sang
  1 sibling, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-07-29 16:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 23, 2013 at 8:01 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>
> ---
> Please apply via the subsystem-tree.

Are you talking to yourself ;-)

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

Yours,
Linus Walleij

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

* [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource
  2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
  2013-07-29 16:39   ` Linus Walleij
@ 2013-08-07 15:38   ` Wolfram Sang
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2013-08-07 15:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 23, 2013 at 08:01:39PM +0200, 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>

Applied to for-next, thanks!

-------------- 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/20130807/5b19df26/attachment.sig>

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

end of thread, other threads:[~2013-08-07 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1374602524-3398-1-git-send-email-wsa@the-dreams.de>
2013-07-23 18:01 ` [PATCH 06/27] drivers/i2c/busses: don't check resource with devm_ioremap_resource Wolfram Sang
2013-07-29 16:39   ` Linus Walleij
2013-08-07 15:38   ` Wolfram Sang
2013-07-23 18:01 ` [PATCH 20/27] drivers/watchdog: " Wolfram Sang
2013-07-23 18:01 ` [PATCH 24/27] sound/soc/pxa: " Wolfram Sang
2013-07-24 14:35   ` Mark Brown

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