mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 05:02:12 +00:00
memory: mvebu-devbus: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
This commit is contained in:
parent
54dd5fcb7c
commit
f3ba1c86c2
@ -267,7 +267,6 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
|
||||
struct devbus_read_params r;
|
||||
struct devbus_write_params w;
|
||||
struct devbus *devbus;
|
||||
struct resource *res;
|
||||
struct clk *clk;
|
||||
unsigned long rate;
|
||||
int err;
|
||||
@ -277,8 +276,7 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
devbus->dev = dev;
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
devbus->base = devm_ioremap_resource(&pdev->dev, res);
|
||||
devbus->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(devbus->base))
|
||||
return PTR_ERR(devbus->base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user