mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 19:06:07 +07:00
drivers: gpio: stp-xway: use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
c68a520f6a
commit
6ba7c53b79
@ -210,7 +210,6 @@ static int xway_stp_hw_init(struct xway_stp *chip)
|
|||||||
|
|
||||||
static int xway_stp_probe(struct platform_device *pdev)
|
static int xway_stp_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct resource *res;
|
|
||||||
u32 shadow, groups, dsl, phy;
|
u32 shadow, groups, dsl, phy;
|
||||||
struct xway_stp *chip;
|
struct xway_stp *chip;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
@ -220,8 +219,7 @@ static int xway_stp_probe(struct platform_device *pdev)
|
|||||||
if (!chip)
|
if (!chip)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
chip->virt = devm_platform_ioremap_resource(pdev, 0);
|
||||||
chip->virt = devm_ioremap_resource(&pdev->dev, res);
|
|
||||||
if (IS_ERR(chip->virt))
|
if (IS_ERR(chip->virt))
|
||||||
return PTR_ERR(chip->virt);
|
return PTR_ERR(chip->virt);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user