Commit 5396ecf7 authored by Fabio Estevam's avatar Fabio Estevam Committed by Mark Brown

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
...@@ -710,7 +710,7 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -710,7 +710,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct resource *iores; struct resource *iores;
struct mxs_saif *saif; struct mxs_saif *saif;
int ret = 0; int irq, ret = 0;
struct device_node *master; struct device_node *master;
if (!np) if (!np)
...@@ -763,16 +763,16 @@ static int mxs_saif_probe(struct platform_device *pdev) ...@@ -763,16 +763,16 @@ static int mxs_saif_probe(struct platform_device *pdev)
if (IS_ERR(saif->base)) if (IS_ERR(saif->base))
return PTR_ERR(saif->base); return PTR_ERR(saif->base);
saif->irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (saif->irq < 0) { if (irq < 0) {
ret = saif->irq; ret = irq;
dev_err(&pdev->dev, "failed to get irq resource: %d\n", dev_err(&pdev->dev, "failed to get irq resource: %d\n",
ret); ret);
return ret; return ret;
} }
saif->dev = &pdev->dev; saif->dev = &pdev->dev;
ret = devm_request_irq(&pdev->dev, saif->irq, mxs_saif_irq, 0, ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
dev_name(&pdev->dev), saif); dev_name(&pdev->dev), saif);
if (ret) { if (ret) {
dev_err(&pdev->dev, "failed to request irq\n"); dev_err(&pdev->dev, "failed to request irq\n");
......
...@@ -116,7 +116,6 @@ struct mxs_saif { ...@@ -116,7 +116,6 @@ struct mxs_saif {
unsigned int mclk; unsigned int mclk;
unsigned int mclk_in_use; unsigned int mclk_in_use;
void __iomem *base; void __iomem *base;
int irq;
unsigned int id; unsigned int id;
unsigned int master_id; unsigned int master_id;
unsigned int cur_rate; unsigned int cur_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment