diff options
author | Ye Xingchen <ye.xingchen@zte.com.cn> | 2023-03-21 19:44:06 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-03-29 21:19:13 +0200 |
commit | 2a37dec127892212f74c26ba7d1e03baa27d6b1a (patch) | |
tree | e57f28ea73a6a85865021468d568ff401d75ed16 /drivers/i2c | |
parent | ba064873ce5d193005e4fac66cdc436587a0dee2 (diff) | |
download | lwn-2a37dec127892212f74c26ba7d1e03baa27d6b1a.tar.gz lwn-2a37dec127892212f74c26ba7d1e03baa27d6b1a.zip |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-brcmstb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c index 69383be47905..ef942714642a 100644 --- a/drivers/i2c/busses/i2c-brcmstb.c +++ b/drivers/i2c/busses/i2c-brcmstb.c @@ -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); |