From patchwork Fri Jul 8 06:24:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liu, ShuoX" X-Patchwork-Id: 956122 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p686Pda7003039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 8 Jul 2011 06:26:05 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qf4VL-0000gv-PZ; Fri, 08 Jul 2011 06:25:35 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Qf4VK-0000gp-VU for spi-devel-general@lists.sourceforge.net; Fri, 08 Jul 2011 06:25:34 +0000 X-ACL-Warn: Received: from mga01.intel.com ([192.55.52.88]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Qf4VJ-0008VL-WF for spi-devel-general@lists.sourceforge.net; Fri, 08 Jul 2011 06:25:34 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 07 Jul 2011 23:25:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.65,498,1304319600"; d="scan'208,223"; a="25288094" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by fmsmga002.fm.intel.com with ESMTP; 07 Jul 2011 23:25:21 -0700 Received: from pgsmsx101.gar.corp.intel.com (10.221.44.78) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.2.255.0; Fri, 8 Jul 2011 14:24:36 +0800 Received: from shsmsx602.ccr.corp.intel.com (10.239.4.104) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.1.289.1; Fri, 8 Jul 2011 14:24:35 +0800 Received: from shsmsx502.ccr.corp.intel.com ([10.239.4.96]) by SHSMSX602.ccr.corp.intel.com ([10.239.4.104]) with mapi; Fri, 8 Jul 2011 14:24:35 +0800 From: "Liu, ShuoX" To: "Tang, Feng" , "grant.likely@secretlab.ca" Date: Fri, 8 Jul 2011 14:24:31 +0800 Subject: [PATCH] dw_spi: Add spi number into spi irq desc Thread-Topic: [PATCH] dw_spi: Add spi number into spi irq desc Thread-Index: Acw9N7Jj0k09BmR9ReKOTwv3kVJOog== Message-ID: <6E3BC7F7C9A4BF4286DD4C043110F30B59E04001D4@shsmsx502.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: zh-CN, en-US MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1Qf4VJ-0008VL-WF Cc: "spi-devel-general@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 08 Jul 2011 06:26:05 +0000 (UTC) >From b260c4e51487364552886b0327fe98d66e850168 Mon Sep 17 00:00:00 2001 From: ShuoX Liu Date: Thu, 7 Jul 2011 16:09:41 +0800 Subject: [PATCH] dw_spi: Add spi number into spi irq desc Signed-off-by: ShuoX Liu --- drivers/spi/dw_spi.c | 4 +++- drivers/spi/dw_spi.h | 1 + 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index 919fa9d..68a3026 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c @@ -818,9 +818,11 @@ int __devinit dw_spi_add_host(struct dw_spi *dws) dws->prev_chip = NULL; dws->dma_inited = 0; dws->dma_addr = (dma_addr_t)(dws->paddr + 0x60); + snprintf(dws->name, sizeof(dws->name), "dw_spi%d", + dws->bus_num); ret = request_irq(dws->irq, dw_spi_irq, IRQF_SHARED, - "dw_spi", dws); + dws->name, dws); if (ret < 0) { dev_err(&master->dev, "can not get IRQ\n"); goto err_free_master; diff --git a/drivers/spi/dw_spi.h b/drivers/spi/dw_spi.h index 7a5e78d..8b7b07b 100644 --- a/drivers/spi/dw_spi.h +++ b/drivers/spi/dw_spi.h @@ -96,6 +96,7 @@ struct dw_spi { struct spi_device *cur_dev; struct device *parent_dev; enum dw_ssi_type type; + char name[16]; void __iomem *regs; unsigned long paddr;