From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Giovanni Di Santi <giovanni.disanti.lkl@gmail.com>,
Helge Deller <deller@gmx.de>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.10.y 1/3] fbdev: kyro: Use devm_ioremap() for mmio registers
Date: Fri, 13 Nov 2026 11:40:55 -0500 [thread overview]
Message-ID: <20261113164024.2109768-1-sashal@kernel.org> (raw)
In-Reply-To: <20261107062153-failed-5.10-d3bc005a6294@kernel.org>
From: Giovanni Di Santi <giovanni.disanti.lkl@gmail.com>
[ Upstream commit e0bf12a43243e6afc5a03fc55c58ec48aba48088 ]
Replace the manual ioremap() call for the MMIO registers with the
device-managed devm_ioremap() variant.
This simplifies the driver's resource management by ensuring the memory is
automatically unmapped when the driver detaches from the device.
Signed-off-by: Giovanni Di Santi <giovanni.disanti.lkl@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: d3bc005a6294 ("fbdev: kyro: Release WC setup on registration failure")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/video/fbdev/kyro/fbdev.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/kyro/fbdev.c b/drivers/video/fbdev/kyro/fbdev.c
index 4979339dbc008..7441d48faea77 100644
--- a/drivers/video/fbdev/kyro/fbdev.c
+++ b/drivers/video/fbdev/kyro/fbdev.c
@@ -713,13 +713,14 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
kyro_fix.mmio_len = pci_resource_len(pdev, 1);
currentpar->regbase = deviceInfo.pSTGReg =
- ioremap(kyro_fix.mmio_start, kyro_fix.mmio_len);
+ devm_ioremap(&pdev->dev, kyro_fix.mmio_start,
+ kyro_fix.mmio_len);
if (!currentpar->regbase)
goto out_free_fb;
info->screen_base = pci_ioremap_wc_bar(pdev, 0);
if (!info->screen_base)
- goto out_unmap_regs;
+ goto out_free_fb;
if (!nomtrr)
currentpar->wc_cookie = arch_phys_wc_add(kyro_fix.smem_start,
@@ -768,8 +769,6 @@ static int kyrofb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
out_unmap:
iounmap(info->screen_base);
-out_unmap_regs:
- iounmap(currentpar->regbase);
out_free_fb:
framebuffer_release(info);
@@ -792,7 +791,6 @@ static void kyrofb_remove(struct pci_dev *pdev)
deviceInfo.ulOverlayOffset = 0;
iounmap(info->screen_base);
- iounmap(par->regbase);
arch_phys_wc_del(par->wc_cookie);
--
2.53.0
next prev parent reply other threads:[~2026-11-13 16:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 11:21 FAILED: patch "[PATCH] fbdev: kyro: Release WC setup on registration failure" failed to apply to 5.10-stable tree Sasha Levin
2026-11-13 16:40 ` Sasha Levin [this message]
2026-11-13 16:40 ` [PATCH 5.10.y 2/3] fbdev: kyro: Use devm_ioremap_wc() for screen mem Sasha Levin
2026-11-13 16:40 ` [PATCH 5.10.y 3/3] fbdev: kyro: Release WC setup on registration failure Sasha Levin
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=20261113164024.2109768-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=deller@gmx.de \
--cc=giovanni.disanti.lkl@gmail.com \
--cc=stable@vger.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