linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Liu, ShuoX" <shuox.liu@intel.com>
To: "Tang, Feng" <feng.tang@intel.com>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>
Cc: "spi-devel-general@lists.sourceforge.net"
	<spi-devel-general@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] dw_spi: Add spi number into spi irq desc
Date: Fri, 8 Jul 2011 14:24:31 +0800	[thread overview]
Message-ID: <6E3BC7F7C9A4BF4286DD4C043110F30B59E04001D4@shsmsx502.ccr.corp.intel.com> (raw)

>From b260c4e51487364552886b0327fe98d66e850168 Mon Sep 17 00:00:00 2001
From: ShuoX Liu <shuox.liu@intel.com>
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 <shuox.liu@intel.com>
---
 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;
-- 
1.7.1

             reply	other threads:[~2011-07-08  6:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08  6:24 Liu, ShuoX [this message]
2011-07-08 19:07 ` [PATCH] dw_spi: Add spi number into spi irq desc Grant Likely
2011-07-08 19:09 ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2011-07-08  3:51 Liu, ShuoX
2011-07-08  4:44 ` Feng Tang
2011-07-08  4:52   ` Liu, ShuoX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6E3BC7F7C9A4BF4286DD4C043110F30B59E04001D4@shsmsx502.ccr.corp.intel.com \
    --to=shuox.liu@intel.com \
    --cc=feng.tang@intel.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).