linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fsl_ssi misc fix
@ 2014-12-02  5:55 Jiada Wang
  2014-12-02  5:55 ` [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe Jiada Wang
  2014-12-02  5:55 ` [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map Jiada Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Jiada Wang @ 2014-12-02  5:55 UTC (permalink / raw)
  To: timur, festevam, lars, arnd, broonie, mpa
  Cc: alsa-devel, tiwai, linux-kernel, lgirdwood, nicoleotsuka,
	Li.Xiubo, linuxppc-dev

Hi,

Changes in v2:
	- fix error path in probe
	- replace irq_of_parse_and_map with platform_get_irq

Changes in v1:
	- free IRQ before irq_dispose_mapping

Jiada Wang (2):
  ASoC: fsl_ssi: fix error path in probe
  ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map

 sound/soc/fsl/fsl_ssi.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

-- 
1.9.3

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

* [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe
  2014-12-02  5:55 [PATCH v2 0/2] fsl_ssi misc fix Jiada Wang
@ 2014-12-02  5:55 ` Jiada Wang
  2014-12-04 22:48   ` Mark Brown
  2014-12-02  5:55 ` [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map Jiada Wang
  1 sibling, 1 reply; 5+ messages in thread
From: Jiada Wang @ 2014-12-02  5:55 UTC (permalink / raw)
  To: timur, festevam, lars, arnd, broonie, mpa
  Cc: alsa-devel, tiwai, linux-kernel, lgirdwood, nicoleotsuka,
	Li.Xiubo, linuxppc-dev

SSI component isn't unregistered if fsl_ssi_debugfs_create() fails
in probe phase.

To fix it, this commit replaces label error_asoc_register with
error_irq.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
 sound/soc/fsl/fsl_ssi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index e695517..e19ed39 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1412,7 +1412,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 
 	ret = fsl_ssi_debugfs_create(&ssi_private->dbg_stats, &pdev->dev);
 	if (ret)
-		goto error_asoc_register;
+		goto error_irq;
 
 	/*
 	 * If codec-handle property is missing from SSI node, we assume
-- 
1.9.3

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

* [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map
  2014-12-02  5:55 [PATCH v2 0/2] fsl_ssi misc fix Jiada Wang
  2014-12-02  5:55 ` [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe Jiada Wang
@ 2014-12-02  5:55 ` Jiada Wang
  2014-12-04 22:48   ` Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Jiada Wang @ 2014-12-02  5:55 UTC (permalink / raw)
  To: timur, festevam, lars, arnd, broonie, mpa
  Cc: alsa-devel, tiwai, linux-kernel, lgirdwood, nicoleotsuka,
	Li.Xiubo, linuxppc-dev

Use platform_get_irq as no mapping needs to be done.
By using platform_get_irq, driver can avoid to free IRQ manually
when SSI driver exits.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
---
 sound/soc/fsl/fsl_ssi.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index e19ed39..a7a9eb8 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1363,7 +1363,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 		return PTR_ERR(ssi_private->regs);
 	}
 
-	ssi_private->irq = irq_of_parse_and_map(np, 0);
+	ssi_private->irq = platform_get_irq(pdev, 0);
 	if (!ssi_private->irq) {
 		dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
 		return -ENXIO;
@@ -1389,7 +1389,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
 	if (ssi_private->soc->imx) {
 		ret = fsl_ssi_imx_probe(pdev, ssi_private, iomem);
 		if (ret)
-			goto error_irqmap;
+			return ret;
 	}
 
 	ret = snd_soc_register_component(&pdev->dev, &fsl_ssi_component,
@@ -1460,10 +1460,6 @@ error_asoc_register:
 	if (ssi_private->soc->imx)
 		fsl_ssi_imx_clean(pdev, ssi_private);
 
-error_irqmap:
-	if (ssi_private->use_dma)
-		irq_dispose_mapping(ssi_private->irq);
-
 	return ret;
 }
 
@@ -1480,9 +1476,6 @@ static int fsl_ssi_remove(struct platform_device *pdev)
 	if (ssi_private->soc->imx)
 		fsl_ssi_imx_clean(pdev, ssi_private);
 
-	if (ssi_private->use_dma)
-		irq_dispose_mapping(ssi_private->irq);
-
 	return 0;
 }
 
-- 
1.9.3

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

* Re: [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe
  2014-12-02  5:55 ` [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe Jiada Wang
@ 2014-12-04 22:48   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-12-04 22:48 UTC (permalink / raw)
  To: Jiada Wang
  Cc: alsa-devel, lars, arnd, lgirdwood, tiwai, linuxppc-dev, timur,
	linux-kernel, nicoleotsuka, Li.Xiubo, mpa, festevam

[-- Attachment #1: Type: text/plain, Size: 165 bytes --]

On Tue, Dec 02, 2014 at 02:55:06PM +0900, Jiada Wang wrote:
> SSI component isn't unregistered if fsl_ssi_debugfs_create() fails
> in probe phase.

applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map
  2014-12-02  5:55 ` [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map Jiada Wang
@ 2014-12-04 22:48   ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-12-04 22:48 UTC (permalink / raw)
  To: Jiada Wang
  Cc: alsa-devel, lars, arnd, lgirdwood, tiwai, linuxppc-dev, timur,
	linux-kernel, nicoleotsuka, Li.Xiubo, mpa, festevam

[-- Attachment #1: Type: text/plain, Size: 298 bytes --]

On Tue, Dec 02, 2014 at 02:55:07PM +0900, Jiada Wang wrote:
> Use platform_get_irq as no mapping needs to be done.
> By using platform_get_irq, driver can avoid to free IRQ manually
> when SSI driver exits.

Fabio sent a version of this before yours so I applied his, I think the
code is the same.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-12-04 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02  5:55 [PATCH v2 0/2] fsl_ssi misc fix Jiada Wang
2014-12-02  5:55 ` [PATCH v2 1/2] ASoC: fsl_ssi: fix error path in probe Jiada Wang
2014-12-04 22:48   ` Mark Brown
2014-12-02  5:55 ` [PATCH v2 2/2] ASoC: fsl_ssi: use platform_get_irq instead of irq_of_parse_and_map Jiada Wang
2014-12-04 22:48   ` Mark Brown

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