Linux Media Controller development
 help / color / mirror / Atom feed
From: Ismael Luceno <ismael@iodev.co.uk>
To: Philipp Stanner <phasta@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Andrey Utkin <andrey_utkin@fastmail.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] media: solo6x10: Replace deprecated PCI functions
Date: Tue, 29 Jul 2025 06:08:38 +0200	[thread overview]
Message-ID: <aIhJRp0Y3VsfHabN@pirotess> (raw)
In-Reply-To: <20250404135344.93241-6-phasta@kernel.org>

On 04/Apr/2025 15:53, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
> Replace them with pcim_iomap_region().
> 
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
> ---
>  drivers/media/pci/solo6x10/solo6x10-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c
> index 6ec1480a6d18..febb2c156cf6 100644
> --- a/drivers/media/pci/solo6x10/solo6x10-core.c
> +++ b/drivers/media/pci/solo6x10/solo6x10-core.c
> @@ -477,10 +477,10 @@ static int solo_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	pci_write_config_byte(pdev, 0x40, 0x00);
>  	pci_write_config_byte(pdev, 0x41, 0x00);
>  
> -	ret = pcim_iomap_regions(pdev, BIT(0), SOLO6X10_NAME);
> +	solo_dev->reg_base = pcim_iomap_region(pdev, 0, SOLO6X10_NAME);
> +	ret = PTR_ERR_OR_ZERO(solo_dev->reg_base);
>  	if (ret)
>  		goto fail_probe;
> -	solo_dev->reg_base = pcim_iomap_table(pdev)[0];
>  
>  	chip_id = solo_reg_read(solo_dev, SOLO_CHIP_OPTION) &
>  				SOLO_CHIP_ID_MASK;

It mostly looks OK, but the error check needs to happen before setting
solo_dev->reg_base, because it's used by free_solo_dev.

  reply	other threads:[~2025-07-29  4:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 13:53 [PATCH 0/5] media: Replace deprecated PCI functions Philipp Stanner
2025-04-04 13:53 ` [PATCH 1/5] media: ipu3-cio2: " Philipp Stanner
2025-04-04 13:53 ` [PATCH 2/5] media: pt3: " Philipp Stanner
2025-04-15 14:16   ` Akihiro TSUKADA
2025-04-04 13:53 ` [PATCH 3/5] media: intel/ipu6: " Philipp Stanner
2025-04-04 13:53 ` [PATCH 4/5] media: solo6x10: " Philipp Stanner
2025-07-29  4:08   ` Ismael Luceno [this message]
2025-04-04 13:53 ` [PATCH 5/5] media: tw5864: " Philipp Stanner
2025-04-14  9:06 ` [PATCH 0/5] media: " Philipp Stanner
2025-04-14  9:15   ` Sakari Ailus

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=aIhJRp0Y3VsfHabN@pirotess \
    --to=ismael@iodev.co.uk \
    --cc=andrey_utkin@fastmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=phasta@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