提交 9cbe0c60 编写于 作者: Y YueHaibing 提交者: Greg Kroah-Hartman

usb: isp1362-hcd: use devm_platform_ioremap_resource() to simplify code

Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190904090549.24456-1-yuehaibing@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 55419932
......@@ -2627,7 +2627,7 @@ static int isp1362_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
struct isp1362_hcd *isp1362_hcd;
struct resource *addr, *data, *irq_res;
struct resource *data, *irq_res;
void __iomem *addr_reg;
void __iomem *data_reg;
int irq;
......@@ -2651,8 +2651,7 @@ static int isp1362_probe(struct platform_device *pdev)
irq = irq_res->start;
addr = platform_get_resource(pdev, IORESOURCE_MEM, 1);
addr_reg = devm_ioremap_resource(&pdev->dev, addr);
addr_reg = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(addr_reg))
return PTR_ERR(addr_reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册