[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35bfd76d-7a44-c6e0-dd71-1ceb70df6397@suse.de>
Date: Thu, 9 Aug 2018 21:27:26 +0200
From: Andreas Färber <afaerber@...e.de>
To: Ben Whitten <ben.whitten@...il.com>
Cc: starnight@...cu.edu.tw, hasnain.virk@....com,
netdev@...r.kernel.org, liuxuenetmail@...il.com, shess@...sware.de,
Ben Whitten <ben.whitten@...rdtech.com>
Subject: Re: [PATCH lora-next v2 2/8] net: lora: sx1301: convert to devm
registration of netdev
Am 09.08.2018 um 14:33 schrieb Ben Whitten:
> We allow the devres framework handle the clean removal of resources on
> teardown of the device, in this case the SPI device, saving lengthy
> unwind code and improving clarity.
>
> Signed-off-by: Ben Whitten <ben.whitten@...rdtech.com>
> ---
> drivers/net/lora/sx1301.c | 87 +++++++++++++++--------------------------------
> 1 file changed, 27 insertions(+), 60 deletions(-)
>
> diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c
> index 5342b61..3c09f5a 100644
> --- a/drivers/net/lora/sx1301.c
> +++ b/drivers/net/lora/sx1301.c
[...]
> static int sx1301_remove(struct spi_device *spi)
> {
> - struct net_device *netdev = spi_get_drvdata(spi);
> -
> - //unregister_loradev(netdev);
Thanks, this part we'll still need later though.
Applying.
Regards,
Andreas
> - free_loradev(netdev);
> -
> dev_info(&spi->dev, "SX1301 module removed\n");
>
> return 0;
[snip]
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Powered by blists - more mailing lists