--- zzzz-none-000/linux-3.10.107/drivers/watchdog/ep93xx_wdt.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/watchdog/ep93xx_wdt.c 2021-02-04 17:41:59.000000000 +0000 @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -119,16 +118,9 @@ int err; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENXIO; - - if (!devm_request_mem_region(&pdev->dev, res->start, - resource_size(res), pdev->name)) - return -EBUSY; - - mmio_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); - if (!mmio_base) - return -ENXIO; + mmio_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(mmio_base)) + return PTR_ERR(mmio_base); if (timeout < 1 || timeout > 3600) { timeout = WDT_TIMEOUT; @@ -140,6 +132,7 @@ val = readl(mmio_base + EP93XX_WATCHDOG); ep93xx_wdt_wdd.bootstatus = (val & 0x01) ? WDIOF_CARDRESET : 0; ep93xx_wdt_wdd.timeout = timeout; + ep93xx_wdt_wdd.parent = &pdev->dev; watchdog_set_nowayout(&ep93xx_wdt_wdd, nowayout); @@ -164,7 +157,6 @@ static struct platform_driver ep93xx_wdt_driver = { .driver = { - .owner = THIS_MODULE, .name = "ep93xx-wdt", }, .probe = ep93xx_wdt_probe, @@ -173,10 +165,9 @@ module_platform_driver(ep93xx_wdt_driver); -MODULE_AUTHOR("Ray Lehtiniemi ," - "Alessandro Zummo ," - "H Hartley Sweeten "); +MODULE_AUTHOR("Ray Lehtiniemi "); +MODULE_AUTHOR("Alessandro Zummo "); +MODULE_AUTHOR("H Hartley Sweeten "); MODULE_DESCRIPTION("EP93xx Watchdog"); MODULE_LICENSE("GPL"); MODULE_VERSION(WDT_VERSION); -MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);