[2/7] mfd: omap-usb-tll: Convert to devm_platform_ioremap_resource()

Message ID 20230706113939.1178-2-frank.li@vivo.com
State New
Headers
Series [1/7] mfd: atmel-hlcdc: Convert to devm_platform_ioremap_resource() |

Commit Message

李扬韬 July 6, 2023, 11:39 a.m. UTC
  Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/mfd/omap-usb-tll.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Lee Jones July 13, 2023, 1:39 p.m. UTC | #1
On Thu, 06 Jul 2023, Yangtao Li wrote:

> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/mfd/omap-usb-tll.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks
  

Patch

diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index 69cbc2097911..906353735c78 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -200,15 +200,13 @@  static unsigned ohci_omap3_fslsmode(enum usbhs_omap_port_mode mode)
 static int usbtll_omap_probe(struct platform_device *pdev)
 {
 	struct device				*dev =  &pdev->dev;
-	struct resource				*res;
 	struct usbtll_omap			*tll;
 	void __iomem				*base;
 	int					i, nch, ver;
 
 	dev_dbg(dev, "starting TI HSUSB TLL Controller\n");
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);