Re: [PATCH] gpio: bt8xx: use devm_ioremap_resource()
Bartosz Golaszewski <[email protected]> Fri, 17 Jul 2026 10:58:46 +0200
| Newsgroups | dev.linux.lists.llvm,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 13 Jul 2026 16:28:10 -0700, Rosen Penev wrote:
> Replace the open-coded devm_request_mem_region() plus devm_ioremap()
> sequence with a single devm_ioremap_resource() call on the BAR0 resource.
> This reserves the region and maps it in one step, and maps the full BAR
> length instead of a hardcoded 0x1000 (BAR0 on the bt848/878 is a 4KB
> register block, so the mapped size is unchanged).
>
> devm_ioremap_resource() returns an ERR_PTR on failure, so check with
> IS_ERR() and propagate PTR_ERR(). Drop the now-redundant error message,
> as devm_ioremap_resource() already logs on every failure path. Since it
> can return -EPROBE_DEFER, place it early.
>
> [...]
Applied, thanks!
[1/1] gpio: bt8xx: use devm_ioremap_resource()
https://git.kernel.org/brgl/c/bbd8254da11c189072349003006091e8327e8d36
Best regards,
--
Bartosz Golaszewski <[email protected]>