generic: mtd: backport SPI_NOR_HAS_LOCK
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.4 / 7211-staging-fsl-dpaa2-mac-Don-t-call-devm_free_irq.patch
1 From b4d01330c66cbab3563c58f66f73f55726c09aec Mon Sep 17 00:00:00 2001
2 From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
3 Date: Tue, 5 Apr 2016 17:54:14 +0300
4 Subject: [PATCH 211/226] staging: fsl-dpaa2/mac: Don't call devm_free_irq
5
6 MAC interrupts are registered with devm_request_threaded_irq(), so
7 there's no need to explicitly unregister them in case of a probe
8 error or at device remove, as the kernel will take care of that for us.
9
10 Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
11 (cherry picked from commit 58e0fd23ade4b13e0a3c7e5f201802013e12df1c)
12 (Stuart: resolved merge conflict)
13 Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
14 ---
15 drivers/staging/fsl-dpaa2/mac/mac.c | 5 +----
16 1 file changed, 1 insertion(+), 4 deletions(-)
17
18 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
19 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
20 @@ -429,13 +429,11 @@ static int setup_irqs(struct fsl_mc_devi
21 DPMAC_IRQ_INDEX, 1);
22 if (err) {
23 dev_err(&mc_dev->dev, "dpmac_set_irq_enable err %d\n", err);
24 - goto unregister_irq;
25 + goto free_irq;
26 }
27
28 return 0;
29
30 -unregister_irq:
31 - devm_free_irq(&mc_dev->dev, mc_dev->irqs[0]->msi_desc->irq, &mc_dev->dev);
32 free_irq:
33 fsl_mc_free_irqs(mc_dev);
34
35 @@ -456,7 +454,6 @@ static void teardown_irqs(struct fsl_mc_
36 if (err)
37 dev_err(&mc_dev->dev, "dpmac_set_irq_enable err %d\n", err);
38
39 - devm_free_irq(&mc_dev->dev, mc_dev->irqs[0]->msi_desc->irq, &mc_dev->dev);
40 fsl_mc_free_irqs(mc_dev);
41 }
42