Commit 80d59826 authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman
Browse files

usb: gadget: pxa25x_udc: 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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190904094222.23128-1-yuehaibing@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9fd7a05e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2321,7 +2321,6 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
	struct pxa25x_udc *dev = &memory;
	int retval, irq;
	u32 chiprev;
	struct resource *res;

	pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);

@@ -2367,8 +2366,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
	if (irq < 0)
		return -ENODEV;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	dev->regs = devm_ioremap_resource(&pdev->dev, res);
	dev->regs = devm_platform_ioremap_resource(pdev, 0);
	if (IS_ERR(dev->regs))
		return PTR_ERR(dev->regs);