linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()'
@ 2018-01-26 15:52 Christophe JAILLET
  2018-01-26 16:16 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2018-01-26 15:52 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, linux-kernel, kernel-janitors, Christophe JAILLET

'spi_alloc_master()' calls should be balanced by a 'spi_master_put()' call.

'spi_controller_put()' is equivalent (see include/linux/spi/spi.h) but it
is cleaner and more logical to use 'spi_master_put()'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/spi/spi-sprd-adi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 5993bdbf79e4..55b9aada467e 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -382,7 +382,7 @@ static int sprd_adi_probe(struct platform_device *pdev)
 free_hwlock:
 	hwspin_lock_free(sadi->hwlock);
 put_ctlr:
-	spi_controller_put(ctlr);
+	spi_master_put(ctlr);
 	return ret;
 }
 
-- 
2.14.1


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()'
  2018-01-26 15:52 [PATCH] spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()' Christophe JAILLET
@ 2018-01-26 16:16 ` Geert Uytterhoeven
  2018-01-26 17:32   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-01-26 16:16 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Mark Brown, linux-spi, Linux Kernel Mailing List, kernel-janitors

Hi Christophe,

On Fri, Jan 26, 2018 at 4:52 PM, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
> 'spi_alloc_master()' calls should be balanced by a 'spi_master_put()' call.
>
> 'spi_controller_put()' is equivalent (see include/linux/spi/spi.h) but it
> is cleaner and more logical to use 'spi_master_put()'.

My intention was to phase out the spi_master_* names, and remove them
when there are no users left.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()'
  2018-01-26 16:16 ` Geert Uytterhoeven
@ 2018-01-26 17:32   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2018-01-26 17:32 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Christophe JAILLET, linux-spi, Linux Kernel Mailing List,
	kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

On Fri, Jan 26, 2018 at 05:16:34PM +0100, Geert Uytterhoeven wrote:
> On Fri, Jan 26, 2018 at 4:52 PM, Christophe JAILLET
> <christophe.jaillet@wanadoo.fr> wrote:
> > 'spi_alloc_master()' calls should be balanced by a 'spi_master_put()' call.

> > 'spi_controller_put()' is equivalent (see include/linux/spi/spi.h) but it
> > is cleaner and more logical to use 'spi_master_put()'.

> My intention was to phase out the spi_master_* names, and remove them
> when there are no users left.

Yeah, a better change here would be adding the matching allocation
function and using that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-26 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 15:52 [PATCH] spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()' Christophe JAILLET
2018-01-26 16:16 ` Geert Uytterhoeven
2018-01-26 17:32   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).