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>
This commit is contained in:
parent
79d2a09d95
commit
808e964e30
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user