linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dw_spi: Add spi number into spi irq desc
@ 2011-07-08  6:24 Liu, ShuoX
  2011-07-08 19:07 ` Grant Likely
  2011-07-08 19:09 ` Grant Likely
  0 siblings, 2 replies; 6+ messages in thread
From: Liu, ShuoX @ 2011-07-08  6:24 UTC (permalink / raw)
  To: Tang, Feng, grant.likely; +Cc: spi-devel-general, linux-kernel

>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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] dw_spi: Add spi number into spi irq desc
  2011-07-08  6:24 [PATCH] dw_spi: Add spi number into spi irq desc Liu, ShuoX
@ 2011-07-08 19:07 ` Grant Likely
  2011-07-08 19:09 ` Grant Likely
  1 sibling, 0 replies; 6+ messages in thread
From: Grant Likely @ 2011-07-08 19:07 UTC (permalink / raw)
  To: Liu, ShuoX; +Cc: Tang, Feng, spi-devel-general, linux-kernel

On Fri, Jul 08, 2011 at 02:24:31PM +0800, Liu, ShuoX wrote:
> 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>

Patch does not apply against current spi/next (linux-next).

g.

> ---
>  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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dw_spi: Add spi number into spi irq desc
  2011-07-08  6:24 [PATCH] dw_spi: Add spi number into spi irq desc Liu, ShuoX
  2011-07-08 19:07 ` Grant Likely
@ 2011-07-08 19:09 ` Grant Likely
  1 sibling, 0 replies; 6+ messages in thread
From: Grant Likely @ 2011-07-08 19:09 UTC (permalink / raw)
  To: Liu, ShuoX; +Cc: Tang, Feng, spi-devel-general, linux-kernel

On Fri, Jul 08, 2011 at 02:24:31PM +0800, Liu, ShuoX wrote:
> 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>

Actually, the problem was just the files were renamed.  Applied, thanks.

g.

> ---
>  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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] dw_spi: Add spi number into spi irq desc
  2011-07-08  4:44 ` Feng Tang
@ 2011-07-08  4:52   ` Liu, ShuoX
  0 siblings, 0 replies; 6+ messages in thread
From: Liu, ShuoX @ 2011-07-08  4:52 UTC (permalink / raw)
  To: Tang, Feng; +Cc: grant.likely, spi-devel-general, linux-kernel

Thank you for your quick response.
That is not a must. I just followed struct i2c_adapter. What about your idea?

Best Regards,
Shuo liu


-----Original Message-----
From: Tang, Feng 
Sent: Friday, July 08, 2011 12:45 PM
To: Liu, ShuoX
Cc: grant.likely@secretlab.ca; spi-devel-general@lists.sourceforge.net; linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dw_spi: Add spi number into spi irq desc

Hi Shuo,

Looks ok to me, and thanks for the fix. One nit is do we have to use a char[48]
for the name?

Thanks,
Feng

On Fri, 8 Jul 2011 11:51:05 +0800
"Liu, ShuoX" <shuox.liu@intel.com> wrote:

> From 2efa9dbb5c4b1d8fa798d1792498ae21fc3a9d04 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..c7b9165 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[48];
>  
>  	void __iomem		*regs;
>  	unsigned long		paddr;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] dw_spi: Add spi number into spi irq desc
  2011-07-08  3:51 Liu, ShuoX
@ 2011-07-08  4:44 ` Feng Tang
  2011-07-08  4:52   ` Liu, ShuoX
  0 siblings, 1 reply; 6+ messages in thread
From: Feng Tang @ 2011-07-08  4:44 UTC (permalink / raw)
  To: Liu, ShuoX; +Cc: grant.likely, spi-devel-general, linux-kernel

Hi Shuo,

Looks ok to me, and thanks for the fix. One nit is do we have to use a char[48]
for the name?

Thanks,
Feng

On Fri, 8 Jul 2011 11:51:05 +0800
"Liu, ShuoX" <shuox.liu@intel.com> wrote:

> From 2efa9dbb5c4b1d8fa798d1792498ae21fc3a9d04 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..c7b9165 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[48];
>  
>  	void __iomem		*regs;
>  	unsigned long		paddr;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] dw_spi: Add spi number into spi irq desc
@ 2011-07-08  3:51 Liu, ShuoX
  2011-07-08  4:44 ` Feng Tang
  0 siblings, 1 reply; 6+ messages in thread
From: Liu, ShuoX @ 2011-07-08  3:51 UTC (permalink / raw)
  To: Tang, Feng, grant.likely; +Cc: spi-devel-general, linux-kernel

>From 2efa9dbb5c4b1d8fa798d1792498ae21fc3a9d04 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..c7b9165 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[48];
 
 	void __iomem		*regs;
 	unsigned long		paddr;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-07-08 19:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08  6:24 [PATCH] dw_spi: Add spi number into spi irq desc Liu, ShuoX
2011-07-08 19:07 ` 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

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).