diff mbox

spi: sprd: Use 'spi_master_put()' instead of 'spi_controller_put()'

Message ID 20180126155256.25956-1-christophe.jaillet@wanadoo.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Christophe JAILLET Jan. 26, 2018, 3:52 p.m. UTC
'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(-)

Comments

Geert Uytterhoeven Jan. 26, 2018, 4:16 p.m. UTC | #1
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
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Jan. 26, 2018, 5:32 p.m. UTC | #2
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.
diff mbox

Patch

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;
 }