From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755614AbaFXVBv (ORCPT ); Tue, 24 Jun 2014 17:01:51 -0400 Received: from mail-ve0-f178.google.com ([209.85.128.178]:37990 "EHLO mail-ve0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752802AbaFXVBs (ORCPT ); Tue, 24 Jun 2014 17:01:48 -0400 MIME-Version: 1.0 In-Reply-To: <1403598315-1429-7-git-send-email-vgupta@synopsys.com> References: <1403598315-1429-1-git-send-email-vgupta@synopsys.com> <1403598315-1429-7-git-send-email-vgupta@synopsys.com> From: Rob Herring Date: Tue, 24 Jun 2014 16:01:27 -0500 Message-ID: Subject: Re: [PATCH v2 REBASED 06/10] serial/arc: remove last remanants of platform data To: Vineet Gupta Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , Paul Bolle , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , Francois.Bedard@synopsys.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 24, 2014 at 3:25 AM, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta > --- > 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 >