From patchwork Fri Dec 6 06:58:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mugunthan V N X-Patchwork-Id: 3293311 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CF8729F373 for ; Fri, 6 Dec 2013 06:58:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0423520489 for ; Fri, 6 Dec 2013 06:58:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0103B20454 for ; Fri, 6 Dec 2013 06:58:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751350Ab3LFG6k (ORCPT ); Fri, 6 Dec 2013 01:58:40 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:43858 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751294Ab3LFG6j (ORCPT ); Fri, 6 Dec 2013 01:58:39 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id rB66wZLh012297; Fri, 6 Dec 2013 00:58:35 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB66wZEE014878; Fri, 6 Dec 2013 00:58:35 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Fri, 6 Dec 2013 00:58:35 -0600 Received: from mugunthan-lt.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB66wXCh020429; Fri, 6 Dec 2013 00:58:34 -0600 From: Mugunthan V N To: CC: , , George Cherian , Mugunthan V N Subject: [PATCH 1/1] drivers: net : cpsw: Use netdev_name while requesting irq Date: Fri, 6 Dec 2013 12:28:27 +0530 Message-ID: <1386313107-8597-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 1.8.5.rc3.2.gc302941 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: George Cherian Use netdev_name while requesting irq so that eth* name is shown in /proc/interrupts. Previously it was showing device name as (null) for cpsw interrupts. For using netdev_name register_netdev and then call devm_request_irq. Signed-off-by: George Cherian Signed-off-by: Mugunthan V N --- drivers/net/ethernet/ti/cpsw.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index a91f0c9..61ae17f 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2090,19 +2090,6 @@ static int cpsw_probe(struct platform_device *pdev) goto clean_ale_ret; } - while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) { - for (i = res->start; i <= res->end; i++) { - if (devm_request_irq(&pdev->dev, i, cpsw_interrupt, 0, - dev_name(priv->dev), priv)) { - dev_err(priv->dev, "error attaching irq\n"); - goto clean_ale_ret; - } - priv->irqs_table[k] = i; - priv->num_irqs = k + 1; - } - k++; - } - ndev->features |= NETIF_F_HW_VLAN_CTAG_FILTER; ndev->netdev_ops = &cpsw_netdev_ops; @@ -2118,6 +2105,19 @@ static int cpsw_probe(struct platform_device *pdev) goto clean_ale_ret; } + while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) { + for (i = res->start; i <= res->end; i++) { + if (devm_request_irq(&pdev->dev, i, cpsw_interrupt, 0, + netdev_name(ndev), priv)) { + dev_err(priv->dev, "error attaching irq\n"); + goto clean_ale_ret; + } + priv->irqs_table[k] = i; + priv->num_irqs = k + 1; + } + k++; + } + if (cpts_register(&pdev->dev, priv->cpts, data->cpts_clock_mult, data->cpts_clock_shift)) dev_err(priv->dev, "error registering cpts device\n");