#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
+#include <linux/err.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/module.h>
}
u->mapbase = resource->start;
- u->membase = devm_request_and_ioremap(&pdev->dev, resource);
- if (!u->membase) {
- dev_err(&pdev->dev, "memregion/iomap address req failed\n");
- return -EADDRNOTAVAIL;
- }
+ u->membase = devm_ioremap_resource(&pdev->dev, resource);
+ if (IS_ERR(u->membase))
+ return PTR_ERR(u->membase);
tup->uart_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(tup->uart_clk)) {