From: YueHaibing <yuehaibing@huawei.com> To: <daniel@zonque.org>, <haojian.zhuang@gmail.com>, <robert.jarzmik@free.fr>, <balbi@kernel.org>, <gregkh@linuxfoundation.org> Cc: <linux-arm-kernel@lists.infradead.org>, <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>, YueHaibing <yuehaibing@huawei.com> Subject: [PATCH -next] usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 17:42:22 +0800 [thread overview] Message-ID: <20190904094222.23128-1-yuehaibing@huawei.com> (raw) Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/usb/gadget/udc/pxa25x_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index d4be535..cfafdd9 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -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); -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: YueHaibing <yuehaibing@huawei.com> To: <daniel@zonque.org>, <haojian.zhuang@gmail.com>, <robert.jarzmik@free.fr>, <balbi@kernel.org>, <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org, YueHaibing <yuehaibing@huawei.com>, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH -next] usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 17:42:22 +0800 [thread overview] Message-ID: <20190904094222.23128-1-yuehaibing@huawei.com> (raw) Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- drivers/usb/gadget/udc/pxa25x_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index d4be535..cfafdd9 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -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); -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-09-04 9:42 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-09-04 9:42 YueHaibing [this message] 2019-09-04 9:42 ` [PATCH -next] usb: gadget: pxa25x_udc: use devm_platform_ioremap_resource() to simplify code YueHaibing
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190904094222.23128-1-yuehaibing@huawei.com \ --to=yuehaibing@huawei.com \ --cc=balbi@kernel.org \ --cc=daniel@zonque.org \ --cc=gregkh@linuxfoundation.org \ --cc=haojian.zhuang@gmail.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=robert.jarzmik@free.fr \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.