mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drivers: spi: bmc2835: use devm_ioremap_resource()
@ 2013-05-02 12:13 Laurent Navet
  2013-05-03  9:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2013-05-02 12:13 UTC (permalink / raw)
  To: swarren, broonie, grant.likely
  Cc: linux-rpi-kernel, spi-devel-general, linux-kernel, Laurent Navet

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_request_and_ioremap.cocci.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/spi/spi-bcm2835.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c
index 89c0b50..a4185e4 100644
--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -331,10 +331,9 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
 		goto out_master_put;
 	}
 
-	bs->regs = devm_request_and_ioremap(&pdev->dev, res);
-	if (!bs->regs) {
-		dev_err(&pdev->dev, "could not request/map memory region\n");
-		err = -ENODEV;
+	bs->regs = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(bs->regs)) {
+		err = PTR_ERR(bs->regs);
 		goto out_master_put;
 	}
 
-- 
1.7.10.4


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

* Re: [PATCH] drivers: spi: bmc2835: use devm_ioremap_resource()
  2013-05-02 12:13 [PATCH] drivers: spi: bmc2835: use devm_ioremap_resource() Laurent Navet
@ 2013-05-03  9:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-05-03  9:41 UTC (permalink / raw)
  To: Laurent Navet
  Cc: swarren, grant.likely, linux-rpi-kernel, spi-devel-general, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

On Thu, May 02, 2013 at 02:13:30PM +0200, Laurent Navet wrote:
> Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Applied, thanks.  Please use subject lines that match those normally
used by the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-05-03  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 12:13 [PATCH] drivers: spi: bmc2835: use devm_ioremap_resource() Laurent Navet
2013-05-03  9:41 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®