summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-04 21:03:06 +0800
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-07-19 23:28:59 +0200
commit808e964e302f4e7b2a84d9f87c7cfd2bdd62a4e5 (patch)
treec036bb0fcbad3a8dd9a12c9d8bf0abb3cf601d35 /drivers/power
parent79d2a09d953fd1939b16e4baf83ab60d2b305e59 (diff)
power: reset: gemini-poweroff: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/reset/gemini-poweroff.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/power/reset/gemini-poweroff.c b/drivers/power/reset/gemini-poweroff.c
index b7f7a8225f22..d309b610142c 100644
--- a/drivers/power/reset/gemini-poweroff.c
+++ b/drivers/power/reset/gemini-poweroff.c
@@ -91,7 +91,6 @@ static void gemini_poweroff(void)
static int gemini_poweroff_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct gemini_powercon *gpw;
u32 val;
int irq;
@@ -101,8 +100,7 @@ static int gemini_poweroff_probe(struct platform_device *pdev)
if (!gpw)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- gpw->base = devm_ioremap_resource(dev, res);
+ gpw->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(gpw->base))
return PTR_ERR(gpw->base);