/* Request the memory region(s) being used by 'port'.  */
static int atmel_request_port(struct uart_port *port)
/* Request the memory region(s) being used by 'port'.  */
static int atmel_request_port(struct uart_port *port)
{
	struct platform_device *pdev = to_platform_device(port->dev);
	int size = pdev->resource[0].end - pdev->resource[0].start + 1;
	if (!request_mem_region(port->mapbase, size, "atmel_serial"))
		return -EBUSY;
	if (port->flags & UPF_IOREMAP) {
		port->membase = ioremap(port->mapbase, size);
		if (port->membase == NULL) {
			release_mem_region(port->mapbase, size);
			return -ENOMEM;
		}
	}
	return 0;
}