aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-12-30 09:11:36 -0500
committerMark Brown <broonie@kernel.org>2014-12-30 11:44:53 -0500
commit5396ecf7b1920595deec83b902502bd3d2da184e (patch)
treef3fdc925ccf57de1504676eafe66f4f1f5d2131e
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
ASoC: mxs-saif: Do not store the irq number in the private structure
The irq number is only used inside the probe function, so there is really no need to store it in the private structure. Use a local 'irq' variable to hold the the irq number instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/mxs/mxs-saif.c10
-rw-r--r--sound/soc/mxs/mxs-saif.h1
2 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index d9865082160c..c866ade28ad0 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -710,7 +710,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
710 struct device_node *np = pdev->dev.of_node; 710 struct device_node *np = pdev->dev.of_node;
711 struct resource *iores; 711 struct resource *iores;
712 struct mxs_saif *saif; 712 struct mxs_saif *saif;
713 int ret = 0; 713 int irq, ret = 0;
714 struct device_node *master; 714 struct device_node *master;
715 715
716 if (!np) 716 if (!np)
@@ -763,16 +763,16 @@ static int mxs_saif_probe(struct platform_device *pdev)
763 if (IS_ERR(saif->base)) 763 if (IS_ERR(saif->base))
764 return PTR_ERR(saif->base); 764 return PTR_ERR(saif->base);
765 765
766 saif->irq = platform_get_irq(pdev, 0); 766 irq = platform_get_irq(pdev, 0);
767 if (saif->irq < 0) { 767 if (irq < 0) {
768 ret = saif->irq; 768 ret = irq;
769 dev_err(&pdev->dev, "failed to get irq resource: %d\n", 769 dev_err(&pdev->dev, "failed to get irq resource: %d\n",
770 ret); 770 ret);
771 return ret; 771 return ret;
772 } 772 }
773 773
774 saif->dev = &pdev->dev; 774 saif->dev = &pdev->dev;
775 ret = devm_request_irq(&pdev->dev, saif->irq, mxs_saif_irq, 0, 775 ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
776 dev_name(&pdev->dev), saif); 776 dev_name(&pdev->dev), saif);
777 if (ret) { 777 if (ret) {
778 dev_err(&pdev->dev, "failed to request irq\n"); 778 dev_err(&pdev->dev, "failed to request irq\n");
diff --git a/sound/soc/mxs/mxs-saif.h b/sound/soc/mxs/mxs-saif.h
index fbaf7badfdfb..9a4c0b291b9e 100644
--- a/sound/soc/mxs/mxs-saif.h
+++ b/sound/soc/mxs/mxs-saif.h
@@ -116,7 +116,6 @@ struct mxs_saif {
116 unsigned int mclk; 116 unsigned int mclk;
117 unsigned int mclk_in_use; 117 unsigned int mclk_in_use;
118 void __iomem *base; 118 void __iomem *base;
119 int irq;
120 unsigned int id; 119 unsigned int id;
121 unsigned int master_id; 120 unsigned int master_id;
122 unsigned int cur_rate; 121 unsigned int cur_rate;