]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: mxs-saif: Do not store the irq number in the private structure
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 30 Dec 2014 14:11:36 +0000 (12:11 -0200)
committerMark Brown <broonie@kernel.org>
Tue, 30 Dec 2014 16:44:53 +0000 (16:44 +0000)
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>
sound/soc/mxs/mxs-saif.c
sound/soc/mxs/mxs-saif.h

index d9865082160cbe6b2081a5c2748c04e048343459..c866ade28ad0a6a0005a9ec97e09c05bfa63a783 100644 (file)
@@ -710,7 +710,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
        struct device_node *np = pdev->dev.of_node;
        struct resource *iores;
        struct mxs_saif *saif;
-       int ret = 0;
+       int irq, ret = 0;
        struct device_node *master;
 
        if (!np)
@@ -763,16 +763,16 @@ static int mxs_saif_probe(struct platform_device *pdev)
        if (IS_ERR(saif->base))
                return PTR_ERR(saif->base);
 
-       saif->irq = platform_get_irq(pdev, 0);
-       if (saif->irq < 0) {
-               ret = saif->irq;
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               ret = irq;
                dev_err(&pdev->dev, "failed to get irq resource: %d\n",
                        ret);
                return ret;
        }
 
        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);
        if (ret) {
                dev_err(&pdev->dev, "failed to request irq\n");
index fbaf7badfdfb03b7d26eb84fd5c1be5850d06d1a..9a4c0b291b9e4c3675ed221f8c862266d290e01a 100644 (file)
@@ -116,7 +116,6 @@ struct mxs_saif {
        unsigned int mclk;
        unsigned int mclk_in_use;
        void __iomem *base;
-       int irq;
        unsigned int id;
        unsigned int master_id;
        unsigned int cur_rate;