Commit 2a37dec1 authored by Ye Xingchen's avatar Ye Xingchen Committed by Wolfram Sang

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: default avatarYe Xingchen <ye.xingchen@zte.com.cn>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent ba064873
......@@ -575,12 +575,10 @@ static void brcmstb_i2c_set_bsc_reg_defaults(struct brcmstb_i2c_dev *dev)
static int bcm2711_release_bsc(struct brcmstb_i2c_dev *dev)
{
struct platform_device *pdev = to_platform_device(dev->device);
struct resource *iomem;
void __iomem *autoi2c;
/* Map hardware registers */
iomem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "auto-i2c");
autoi2c = devm_ioremap_resource(&pdev->dev, iomem);
autoi2c = devm_platform_ioremap_resource_byname(pdev, "auto-i2c");
if (IS_ERR(autoi2c))
return PTR_ERR(autoi2c);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment