On Wed, May 11, 2011 at 09:27:00PM +0800, Axel Lin wrote:
> spi_master_put() should only be used in error handling.
> Once spi_register_master() returns success, we should call
> spi_unregister_master() instead.
>
> Signed-off-by: Axel Lin <[email protected]>
Applied, thanks.
g.
> ---
> drivers/spi/spi_sh.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/spi/spi_sh.c b/drivers/spi/spi_sh.c
> index 869a07d..9eedd71 100644
> --- a/drivers/spi/spi_sh.c
> +++ b/drivers/spi/spi_sh.c
> @@ -427,10 +427,10 @@ static int __devexit spi_sh_remove(struct
> platform_device *pdev)
> {
> struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev);
>
> + spi_unregister_master(ss->master);
> destroy_workqueue(ss->workqueue);
> free_irq(ss->irq, ss);
> iounmap(ss->addr);
> - spi_master_put(ss->master);
>
> return 0;
> }
> --
> 1.7.1
>
>
>
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general