Skip to content

Commit 43d37ff

Browse files
Zhang Zekundamien-lemoal
authored andcommitted
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 <[email protected]> Signed-off-by: Damien Le Moal <[email protected]>
1 parent 13acf2b commit 43d37ff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/ata/ahci_brcm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ static int brcm_ahci_probe(struct platform_device *pdev)
437437
struct device *dev = &pdev->dev;
438438
struct brcm_ahci_priv *priv;
439439
struct ahci_host_priv *hpriv;
440-
struct resource *res;
441440
int ret;
442441

443442
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -451,8 +450,7 @@ static int brcm_ahci_probe(struct platform_device *pdev)
451450
priv->version = (unsigned long)of_id->data;
452451
priv->dev = dev;
453452

454-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "top-ctrl");
455-
priv->top_ctrl = devm_ioremap_resource(dev, res);
453+
priv->top_ctrl = devm_platform_ioremap_resource_byname(pdev, "top-ctrl");
456454
if (IS_ERR(priv->top_ctrl))
457455
return PTR_ERR(priv->top_ctrl);
458456

0 commit comments

Comments
 (0)