Skip to content

Commit 2a37dec

Browse files
Ye Xingchenwsakernel
authored andcommitted
i2c: brcmstb: use devm_platform_ioremap_resource_byname()
Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent ba06487 commit 2a37dec

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/i2c/busses/i2c-brcmstb.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,10 @@ static void brcmstb_i2c_set_bsc_reg_defaults(struct brcmstb_i2c_dev *dev)
575575
static int bcm2711_release_bsc(struct brcmstb_i2c_dev *dev)
576576
{
577577
struct platform_device *pdev = to_platform_device(dev->device);
578-
struct resource *iomem;
579578
void __iomem *autoi2c;
580579

581580
/* Map hardware registers */
582-
iomem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "auto-i2c");
583-
autoi2c = devm_ioremap_resource(&pdev->dev, iomem);
581+
autoi2c = devm_platform_ioremap_resource_byname(pdev, "auto-i2c");
584582
if (IS_ERR(autoi2c))
585583
return PTR_ERR(autoi2c);
586584

0 commit comments

Comments
 (0)