This patch adds the managed APIs to the deriver code. By using this we need
not to worry about freeing the memory and irq numbers.
Thanks and Regards,
Varka Bhadram
Signed-off-by: Varka Bhadram <varkab@xxxxxxx>
---
drivers/net/ieee802154/mrf24j40.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 78a6552..729ec0f 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -618,10 +618,11 @@ 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);