Skip to content

Commit 9cf38a0

Browse files
Ye Xingchenffainelli
authored andcommitted
bus: brcmstb_gisb: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Florian Fainelli <[email protected]>
1 parent fe15c26 commit 9cf38a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/bus/brcmstb_gisb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,10 @@ static int __init brcmstb_gisb_arb_probe(struct platform_device *pdev)
401401
struct device_node *dn = pdev->dev.of_node;
402402
struct brcmstb_gisb_arb_device *gdev;
403403
const struct of_device_id *of_id;
404-
struct resource *r;
405404
int err, timeout_irq, tea_irq, bp_irq;
406405
unsigned int num_masters, j = 0;
407406
int i, first, last;
408407

409-
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
410408
timeout_irq = platform_get_irq(pdev, 0);
411409
tea_irq = platform_get_irq(pdev, 1);
412410
bp_irq = platform_get_irq(pdev, 2);
@@ -418,7 +416,7 @@ static int __init brcmstb_gisb_arb_probe(struct platform_device *pdev)
418416
mutex_init(&gdev->lock);
419417
INIT_LIST_HEAD(&gdev->next);
420418

421-
gdev->base = devm_ioremap_resource(&pdev->dev, r);
419+
gdev->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
422420
if (IS_ERR(gdev->base))
423421
return PTR_ERR(gdev->base);
424422

0 commit comments

Comments
 (0)