public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "Sunny Luo" <sunny.luo@amlogic.com>,
	"Xianwei Zhao" <xianwei.zhao@amlogic.com>,
	"Chin-Ting Kuo" <chin-ting_kuo@aspeedtech.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Radu Pirea" <radu_nicolae.pirea@upb.ro>,
	"William Zhang" <william.zhang@broadcom.com>,
	"Kursad Oney" <kursad.oney@broadcom.com>,
	"Jonas Gorski" <jonas.gorski@gmail.com>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, "Heiner Kallweit" <hkallweit1@gmail.com>
Subject: Re: [PATCH 14/20] spi: fsl: fix controller deregistration
Date: Thu, 9 Apr 2026 15:11:27 +0200	[thread overview]
Message-ID: <adelf3U4Tqp0-2Jz@hovoldconsulting.com> (raw)
In-Reply-To: <20260409120419.388546-15-johan@kernel.org>

On Thu, Apr 09, 2026 at 02:04:13PM +0200, Johan Hovold wrote:
> Make sure to deregister the controller before releasing underlying
> resources like DMA during driver unbind.
> 
> Fixes: 4178b6b1b595 ("spi: fsl-(e)spi: migrate to using devm_ functions to simplify cleanup")
> Cc: stable@vger.kernel.org	# 4.3
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>

> @@ -614,7 +614,7 @@ static struct spi_controller *fsl_spi_probe(struct device *dev,
>  
>  	mpc8xxx_spi_write_reg(&reg_base->mode, regval);
>  
> -	ret = devm_spi_register_controller(dev, host);
> +	ret = spi_register_controller(host);
>  	if (ret < 0)
>  		goto err_probe;
>  
> @@ -751,7 +751,13 @@ static void plat_mpc8xxx_spi_remove(struct platform_device *pdev)
>  	struct spi_controller *host = platform_get_drvdata(pdev);
>  	struct mpc8xxx_spi *mpc8xxx_spi = spi_controller_get_devdata(host);
>  
> +	spi_controller_get(host);
> +
> +	spi_unregister_controller(host);
> +
>  	fsl_spi_cpm_free(mpc8xxx_spi);
> +
> +	spi_controller_put(host);
>  }

I missed that this module registers two platform drivers so this patch
will need another spin (reported by Sashiko).

Johan

  reply	other threads:[~2026-04-09 13:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260409120419.388546-1-johan@kernel.org>
2026-04-09 12:04 ` [PATCH 01/20] spi: amlogic-spisg: fix controller deregistration Johan Hovold
2026-04-09 12:04 ` [PATCH 02/20] spi: aspeed-smc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 03/20] spi: at91-usart: " Johan Hovold
2026-04-09 12:04 ` [PATCH 04/20] spi: atmel: " Johan Hovold
2026-04-09 12:04 ` [PATCH 05/20] spi: bcm63xx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 06/20] spi: bcm63xx-hsspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 07/20] spi: bcmbca-hsspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 08/20] spi: octeon: " Johan Hovold
2026-04-09 12:04 ` [PATCH 09/20] spi: cavium-thunderx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 10/20] spi: coldfire-qspi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 11/20] spi: dln2: " Johan Hovold
2026-04-09 12:04 ` [PATCH 12/20] spi: ep93xx: " Johan Hovold
2026-04-09 12:04 ` [PATCH 13/20] spi: fsl-espi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 14/20] spi: fsl: " Johan Hovold
2026-04-09 13:11   ` Johan Hovold [this message]
2026-04-09 12:04 ` [PATCH 15/20] spi: img-spfi: " Johan Hovold
2026-04-09 12:04 ` [PATCH 16/20] spi: lantiq-ssc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 17/20] spi: meson-spicc: " Johan Hovold
2026-04-09 12:04 ` [PATCH 18/20] spi: microchip-core-qspi: " Johan Hovold
2026-04-09 16:13   ` Conor Dooley
2026-04-09 17:27     ` Mark Brown
2026-04-09 12:04 ` [PATCH 19/20] spi: microchip-core-spi: " Johan Hovold
2026-04-09 16:10   ` Conor Dooley
2026-04-09 12:04 ` [PATCH 20/20] spi: mpfs: " Johan Hovold
2026-04-09 16:13   ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adelf3U4Tqp0-2Jz@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=broonie@kernel.org \
    --cc=chin-ting_kuo@aspeedtech.com \
    --cc=clg@kaod.org \
    --cc=hkallweit1@gmail.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kursad.oney@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=radu_nicolae.pirea@upb.ro \
    --cc=stable@vger.kernel.org \
    --cc=sunny.luo@amlogic.com \
    --cc=william.zhang@broadcom.com \
    --cc=xianwei.zhao@amlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox