Thread (3 messages) 3 messages, 2 authors, 2014-05-29

Re: [PATCH net-next v1] mrf24j40: add managed API's provided by device layer

flat view

From: Tushar Behera <hidden>
Date: 2014-05-29 06:32:47
Also in: lkml

On Thu, May 29, 2014 at 10:10:21AM +0530, Varka Bhadram wrote:
Hi,
	Previous patch having bug in using managed API's. I fixed that.

Regards,
Varka Bhadram.
Only add relevant commit message here, no need to add 'Hi' and
'Regards'.

Something like ...

"Added devres managed APIs"
quoted hunk ↗ jump to hunk
Signed-off-by: Varka Bhadram <redacted>
---
 drivers/net/ieee802154/mrf24j40.c |   21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 78a6552..f701cdb 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -618,10 +618,10 @@ static int mrf24j40_probe(struct spi_device *spi)
 
 	printk(KERN_INFO "mrf24j40: probe(). IRQ: %d\n", spi->irq);
 
-	devrec = kzalloc(sizeof(struct mrf24j40), GFP_KERNEL);
+	devrec = devm_kzalloc(&spi->dev, sizeof(struct mrf24j40), GFP_KERNEL);
 	if (!devrec)
 		goto err_devrec;
-	devrec->buf = kzalloc(3, GFP_KERNEL);
+	devrec->buf = kzalloc(&spi->dev, 3, GFP_KERNEL);
devm_kzalloc()

Without this, it should not build at all. So remember to compile test
before sending the patches.

--
Warm regards,
Tushar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help