mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
mips/pci: use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
7c18b64bba
commit
b43340ddae
1 changed files with 1 additions and 3 deletions
|
@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev)
|
||||||
struct rt3883_pci_controller *rpc;
|
struct rt3883_pci_controller *rpc;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct device_node *np = dev->of_node;
|
struct device_node *np = dev->of_node;
|
||||||
struct resource *res;
|
|
||||||
struct device_node *child;
|
struct device_node *child;
|
||||||
u32 val;
|
u32 val;
|
||||||
int err;
|
int err;
|
||||||
|
@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev)
|
||||||
if (!rpc)
|
if (!rpc)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
rpc->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
rpc->base = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(rpc->base))
|
if (IS_ERR(rpc->base))
|
||||||
return PTR_ERR(rpc->base);
|
return PTR_ERR(rpc->base);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue