mfd: omap-usb-tll: Convert to devm_platform_ioremap_resource()
authorYangtao Li <frank.li@vivo.com>
Thu, 6 Jul 2023 11:39:34 +0000 (19:39 +0800)
committerLee Jones <lee@kernel.org>
Fri, 18 Aug 2023 20:48:00 +0000 (21:48 +0100)
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230706113939.1178-2-frank.li@vivo.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/omap-usb-tll.c

index 69cbc20..9063537 100644 (file)
@@ -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);