mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Frank.Li@oss.nxp.com
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Vladimir Oltean <olteanv@gmail.com>, Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>, Han Xu <han.xu@nxp.com>,
	Haibo Chen <haibo.chen@nxp.com>,
	Linus Walleij <linusw@kernel.org>,
	"open list:SPI SUBSYSTEM" <linux-spi@vger.kernel.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-rpi-kernel@lists.infradead.org>,
	"moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:FREESCALE DSPI DRIVER" <imx@lists.linux.dev>,
	vkoul@kernel.org
Subject: Re: [PATCH 2/2] spi: use dmaengine_get_dma_device() instead of chan->device->dev
Date: Tue, 29 Sep 2026 22:43:55 +0100	[thread overview]
Message-ID: <a9a4fc5a-df79-47f7-b963-217439e0b020@sirena.org.uk> (raw)
In-Reply-To: <20260929155445.3311133-2-Frank.Li@oss.nxp.com>

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

On Tue, Sep 29, 2026 at 11:54:43AM -0400, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
> 
> Replace direct dma_chan::device::dev access with the proper
> dmaengine_get_dma_device() for consumer API

> @@ -1174,16 +1177,15 @@ static int bcm2835_spi_setup_dma(struct spi_controller *ctlr,
>  				 struct bcm2835_spi *bs,
>  				 struct bcm2835_spidev *target)
>  {
> +	struct device *rx_dev = dmaengine_get_dma_device(ctlr->dma_rx);
>  	int ret;
>  
>  	if (!ctlr->dma_rx)
>  		return 0;
>  

This moves the use of dma_rx after the NULL check.  Possibly
dmaengine_get_dma_device() will do the right thing but still there's
more updates needed.

> @@ -766,21 +769,21 @@ static int dspi_request_dma(struct fsl_dspi *dspi, phys_addr_t phy_addr)
>  static void dspi_release_dma(struct fsl_dspi *dspi)
>  {
>  	struct fsl_dspi_dma *dma = dspi->dma;
> +	struct device *tx_dev = dmaengine_get_dma_device(dma->chan_tx);
> +	struct device *rx_dev = dmaengine_get_dma_device(dma->chan_rx);
>  
>  	if (!dma)
>  		return;

Similar issue here, though things are a bit more involved.

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

      reply	other threads:[~2026-09-29 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 15:54 [PATCH 1/2] spi: use dmaengine public API instead of raw ops Frank.Li
2026-09-29 15:54 ` [PATCH 2/2] spi: use dmaengine_get_dma_device() instead of chan->device->dev Frank.Li
2026-09-29 21:43   ` Mark Brown [this message]

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=a9a4fc5a-df79-47f7-b963-217439e0b020@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.Li@oss.nxp.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=festevam@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=haibo.chen@nxp.com \
    --cc=han.xu@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sbranden@broadcom.com \
    --cc=vkoul@kernel.org \
    /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

all inboxes | Powered by JetHome®