Re: [PATCH 5/5] spi: make remove callback a void function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 23 January 2022 18:52:01 CET Uwe Kleine-König wrote:
> 
> The value returned by an spi driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
> 
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

[...]
> diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c
> index 55ffcd7c42e2..fa0ff66a457d 100644
> --- a/drivers/staging/wfx/bus_spi.c
> +++ b/drivers/staging/wfx/bus_spi.c
> @@ -232,12 +232,11 @@ static int wfx_spi_probe(struct spi_device *func)
>         return wfx_probe(bus->core);
>  }
> 
> -static int wfx_spi_remove(struct spi_device *func)
> +static void wfx_spi_remove(struct spi_device *func)
>  {
>         struct wfx_spi_priv *bus = spi_get_drvdata(func);
> 
>         wfx_release(bus->core);
> -       return 0;
>  }
> 
>  /* For dynamic driver binding, kernel does not use OF to match driver. It only

For the wfx driver: 

Acked-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

-- 
Jérôme Pouiller






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux