[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqLpLKs0+u2a0VvgYW_0bGDpQCOEJSqKDqpYTO=KuO6uhg@mail.gmail.com>
Date: Tue, 24 Jun 2014 16:01:27 -0500
From: Rob Herring <robherring2@...il.com>
To: Vineet Gupta <Vineet.Gupta1@...opsys.com>
Cc: Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>, Paul Bolle <pebolle@...cali.nl>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
Francois.Bedard@...opsys.com
Subject: Re: [PATCH v2 REBASED 06/10] serial/arc: remove last remanants of
platform data
On Tue, Jun 24, 2014 at 3:25 AM, Vineet Gupta
<Vineet.Gupta1@...opsys.com> wrote:
> Signed-off-by: Vineet Gupta <vgupta@...opsys.com>
> ---
> drivers/tty/serial/arc_uart.c | 22 ++++++----------------
> 1 file changed, 6 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
> index 2ffaf099691a..dc3d5db37dc4 100644
> --- a/drivers/tty/serial/arc_uart.c
> +++ b/drivers/tty/serial/arc_uart.c
> @@ -518,21 +516,13 @@ arc_uart_init_one(struct platform_device *pdev, int dev_id)
> }
> uart->baud = val;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -ENODEV;
> -
> - res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> - if (!res2)
> - return -ENODEV;
> -
> - port->mapbase = res->start;
> - port->membase = ioremap_nocache(res->start, resource_size(res));
> + port->membase = of_iomap(np, 0);
ioremap is preferred over of_iomap as it is not OF specific. Perhaps
use devm_request_and_ioremap instead.
> if (!port->membase)
> /* No point of dev_err since UART itself is hosed here */
> return -ENXIO;
>
> - port->irq = res2->start;
> + port->irq = irq_of_parse_and_map(np, 0);
> +
platform_get_irq should be used here.
> port->dev = &pdev->dev;
> port->iotype = UPIO_MEM;
> port->flags = UPF_BOOT_AUTOCONF;
> --
> 1.8.3.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists