From patchwork Sat Jun 4 07:10:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 9154513 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2323560467 for ; Sat, 4 Jun 2016 07:15:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 14EE9267EC for ; Sat, 4 Jun 2016 07:15:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09A252832B; Sat, 4 Jun 2016 07:15:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9ACA267EC for ; Sat, 4 Jun 2016 07:15:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b95lq-00083q-JN; Sat, 04 Jun 2016 07:13:22 +0000 Received: from smtp31.i.mail.ru ([94.100.177.91]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b95k3-0005qx-UP for linux-arm-kernel@lists.infradead.org; Sat, 04 Jun 2016 07:11:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=ADqBAVdC+yshH8OfYaPZOOCG4cOm/5GC7ycUNy+4ZG4=; b=PXvGDJF2AhPcZ9OjOiWeTrQOuTvw7BdH62OeJlYzbv5OxbaXj2gziDwnvmguWi9NWcdQMNiGfEKyCGgNq37gOsZUcSAC1pqxlDbOGd6h9cr80Emy90az0FCIwKsdf4+KWD3cUbMB+PaYaMsBDTRjflX6aZ2BZg1Ok5rrf5q8GA4=; Received: from [5.18.96.7] (port=41685 helo=shc.zet) by smtp31.i.mail.ru with esmtpa (envelope-from ) id 1b95jj-0000n0-FI; Sat, 04 Jun 2016 10:11:11 +0300 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 19/22] serial: clps711x: Remove board support Date: Sat, 4 Jun 2016 10:10:11 +0300 Message-Id: <1465024214-22120-20-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 2.4.9 In-Reply-To: <1465024214-22120-1-git-send-email-shc_work@mail.ru> References: <1465024214-22120-1-git-send-email-shc_work@mail.ru> X-Mras: OK X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160604_001132_638670_8099D84A X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , Alexander Shiyan , Russell King , Arnd Bergmann , Jiri Slaby MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since board support for the CLPS711X platform was removed, remove the board support from the driver. Signed-off-by: Alexander Shiyan --- drivers/tty/serial/clps711x.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index ac13286..b8be687 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -446,12 +446,15 @@ static struct console clps711x_console = { static int uart_clps711x_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - int ret, index = np ? of_alias_get_id(np, "serial") : pdev->id; struct clps711x_port *s; struct resource *res; struct clk *uart_clk; - int irq; + int irq, ret, index; + if (!np) + return -ENODEV; + + index = of_alias_get_id(np, "serial"); if (index < 0 || index >= UART_CLPS711X_NR) return -EINVAL; @@ -477,18 +480,9 @@ static int uart_clps711x_probe(struct platform_device *pdev) if (s->rx_irq < 0) return s->rx_irq; - if (!np) { - char syscon_name[9]; - - sprintf(syscon_name, "syscon.%i", index + 1); - s->syscon = syscon_regmap_lookup_by_pdevname(syscon_name); - if (IS_ERR(s->syscon)) - return PTR_ERR(s->syscon); - } else { - s->syscon = syscon_regmap_lookup_by_phandle(np, "syscon"); - if (IS_ERR(s->syscon)) - return PTR_ERR(s->syscon); - } + s->syscon = syscon_regmap_lookup_by_phandle(np, "syscon"); + if (IS_ERR(s->syscon)) + return PTR_ERR(s->syscon); s->port.line = index; s->port.dev = &pdev->dev;