From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933409AbaFLKd1 (ORCPT ); Thu, 12 Jun 2014 06:33:27 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.44.111]:44049 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933238AbaFLKdU (ORCPT ); Thu, 12 Jun 2014 06:33:20 -0400 From: Vineet Gupta To: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , Greg Kroah-Hartman , Jiri Slaby , Paul Bolle CC: , , , , Vineet Gupta Subject: [PATCH 6/9] serial/arc: remove last remanants of platform data Date: Thu, 12 Jun 2014 16:01:36 +0530 Message-ID: <1402569099-9900-7-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1402569099-9900-1-git-send-email-vgupta@synopsys.com> References: <1402569099-9900-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.12.196.93] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include +#include /************************************* * ARC UART Hardware Specs @@ -499,11 +499,9 @@ static struct uart_ops arc_serial_pops = { static int arc_uart_init_one(struct platform_device *pdev, int dev_id) { - struct resource *res, *res2; + struct device_node *np = pdev->dev.of_node; struct arc_uart_port *uart = &arc_uart_ports[dev_id]; struct uart_port *port = &uart->port; - - struct device_node *np = pdev->dev.of_node; u32 val; if (of_property_read_u32(np, "clock-frequency", &val)) { @@ -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); 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); + port->dev = &pdev->dev; port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF; -- 1.8.3.2