summaryrefslogtreecommitdiff
path: root/drivers/ata
diff options
context:
space:
mode:
authorZhang Zekun <zhangzekun11@huawei.com>2024-08-27 18:58:23 +0800
committerDamien Le Moal <dlemoal@kernel.org>2024-08-28 10:32:21 +0900
commit43d37fffda9b7ad10ae90122ea532a829bdd2f92 (patch)
tree865ad7d065da4b9a47718b21309a6bad3592d975 /drivers/ata
parent13acf2b74803a9a9ab3475c306d5814cf3cefbd8 (diff)
downloadlwn-43d37fffda9b7ad10ae90122ea532a829bdd2f92.tar.gz
lwn-43d37fffda9b7ad10ae90122ea532a829bdd2f92.zip
ata: ahci_brcm: Use devm_platform_ioremap_resource_byname() helper function
platform_get_resource_byname() and devm_ioremap_resource() can be replaced by devm_platform_ioremap_resource_byname(), which can simplify the code logic a bit, No functional change here. Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ahci_brcm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index 70c3a33eee6f..2f16524c2526 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -437,7 +437,6 @@ static int brcm_ahci_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct brcm_ahci_priv *priv;
struct ahci_host_priv *hpriv;
- struct resource *res;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -451,8 +450,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
priv->version = (unsigned long)of_id->data;
priv->dev = dev;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
- priv->top_ctrl = devm_ioremap_resource(dev, res);
+ priv->top_ctrl = devm_platform_ioremap_resource_byname(pdev, "top-ctrl");
if (IS_ERR(priv->top_ctrl))
return PTR_ERR(priv->top_ctrl);