Re: [PATCH] ALSA: sis7019: Use pcim_iomap_region() for MMIO BAR

From: Takashi Iwai

Date: Mon Jul 20 2026 - 02:45:56 EST


On Mon, 20 Jul 2026 02:09:29 +0200,
Rosen Penev wrote:
>
> Replace the open-coded pcim_request_all_regions() +
> devm_ioremap() pair with per-BAR pcim helpers: reserve BAR0 (the
> I/O port region, used via inl/outl) with pcim_request_region(), and
> reserve + iomap BAR1 (MMIO) with a single pcim_iomap_region() call.
>
> This folds the BAR1 reserve and iomap into one managed call. The
> error check moves from a NULL test to IS_ERR(), since pcim_iomap_region()
> returns an IOMEM_ERR_PTR on failure.
>
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>

The original code had a fixed BAR size, but let's hope that it was
just a lazy code and not a workaround.

Applied now to for-next branch. Thanks.


Takashi