From patchwork Thu Mar 16 12:26:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 9628031 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 2D1E660244 for ; Thu, 16 Mar 2017 12:28:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E65828599 for ; Thu, 16 Mar 2017 12:28:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1326828644; Thu, 16 Mar 2017 12:28:08 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D92328599 for ; Thu, 16 Mar 2017 12:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9YIIv2+lDPVFhhZ+JK2Te7TdNll1S2JT2NjaOAtZ92U=; b=ANfShpMPWkLWSj VZjwSLGtb5DOUtRDQYmc2+3qN5YTR28BRMEx8lpxfAdxMKAD+WSRLCGvWvCZhz1+aQGxdxDCEROrj 6/J2C6ZeYN7fwV91so3uXFtwLXXMPxRMXdnRab5c9kMpLL/7Fo8ybzu3NJHKNvkbnQ8ixGW0Ogekk p/U6KEPSX6YjBBxifIqHUJALx6E0EMfwCRnFrP9noc2MXvYHd5Omm10XCswaLHRAoYT51gxa7d3kr G2aINAhWc7nO+r2M70COsskrXhAO6Icf8I1a9mZvpr4WyDX+va9U0K30hTCyWt9EQKcJaYhLqssXt 9YaDBe6L3bbIXgpaypdg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1coUVT-0002OT-0o; Thu, 16 Mar 2017 12:27:51 +0000 Received: from lelnx194.ext.ti.com ([198.47.27.80]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coUVO-0002Le-Pp for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2017 12:27:48 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2GCRKPe019556; Thu, 16 Mar 2017 07:27:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489667240; bh=h3QtDT/yDq12Ki4mi2fe/2xU6YZjCg4anQpM123w2R4=; h=From:To:CC:Subject:Date; b=ErfrgKh9cWTW4lk5HifqCFTHBVuDvF1NNCGbyjif0ubYbOjEmYYetq/YZ86LZhS/A YndDViGkNAsrXZFOTZrRGpSmBFfH0QiGvXxTosdWh9hzAlRPgXnO9OFApbJqw2ggN5 Te8AzplFBUAIYC4XWePEtNoGNlN1Rj6LbDfj1zH4= Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2GCRKSS004222; Thu, 16 Mar 2017 07:27:20 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 16 Mar 2017 07:27:19 -0500 Received: from a0132425.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2GCRGuk004119; Thu, 16 Mar 2017 07:27:17 -0500 From: Vignesh R To: Greg Kroah-Hartman Subject: [PATCH] serial: 8250: 8250_core: Fix irq name for 8250 serial irq Date: Thu, 16 Mar 2017 17:56:53 +0530 Message-ID: <20170316122653.19930-1-vigneshr@ti.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170316_052746_966821_A78CC399 X-CRM114-Status: UNSURE ( 7.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jisheng Zhang , Vignesh R , linux-kernel@vger.kernel.org, Andy Shevchenko , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org 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 Using dev_name() as irq name during request_irq() might be misleading in case of serial over PCI. Therefore use a better alternative name for identifying serial port irqs as "serial" appended with serial_index of the port. This ensures that "serial" string is always present in irq name while port index will help in distinguishing b/w different ports. Signed-off-by: Vignesh R --- Based on top of tty-next. drivers/tty/serial/8250/8250_core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index f83b69f30987..78bf621d6827 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -213,12 +213,20 @@ static int serial_link_irq_chain(struct uart_8250_port *up) ret = 0; } else { + char *irqname = kmalloc(20, GFP_KERNEL); + if (!irqname) { + spin_unlock_irq(&i->lock); + return -ENOMEM; + } + snprintf(irqname, 20, + "serial%d", serial_index(&up->port)); + INIT_LIST_HEAD(&up->list); i->head = &up->list; spin_unlock_irq(&i->lock); irq_flags |= up->port.irqflags; ret = request_irq(up->port.irq, serial8250_interrupt, - irq_flags, dev_name(up->port.dev), i); + irq_flags, irqname, i); if (ret < 0) serial_do_unlink(i, up); }