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.whit...@lairdtech.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)

Reply via email to