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

From: Tushar Behera
Date: Thu May 29 2014 - 02:33:08 EST


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"

>
> Signed-off-by: Varka Bhadram <varkab@xxxxxxx>
> ---
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/