From: manish.narani@xilinx.com (Manish Narani)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/4] iio: adc: xilinx: Move request_irq before enabling interrupts
Date: Mon, 23 Jul 2018 20:32:03 +0530 [thread overview]
Message-ID: <1532358123-23485-5-git-send-email-manish.narani@xilinx.com> (raw)
In-Reply-To: <1532358123-23485-1-git-send-email-manish.narani@xilinx.com>
Enabling the Interrupts before registering the irq handler is a bad
idea. This patch corrects the same for XADC driver.
Signed-off-by: Manish Narani <manish.narani@xilinx.com>
---
drivers/iio/adc/xilinx-xadc-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 44a2519..3f6be5a 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -1226,15 +1226,15 @@ static int xadc_probe(struct platform_device *pdev)
if (ret)
goto err_free_samplerate_trigger;
- ret = xadc->ops->setup(pdev, indio_dev, xadc->irq);
- if (ret)
- goto err_clk_disable_unprepare;
-
ret = request_irq(xadc->irq, xadc->ops->interrupt_handler, 0,
dev_name(&pdev->dev), indio_dev);
if (ret)
goto err_clk_disable_unprepare;
+ ret = xadc->ops->setup(pdev, indio_dev, xadc->irq);
+ if (ret)
+ goto err_free_irq;
+
for (i = 0; i < 16; i++)
xadc_read_adc_reg(xadc, XADC_REG_THRESHOLD(i),
&xadc->threshold[i]);
--
2.1.1
next prev parent reply other threads:[~2018-07-23 15:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 15:01 [PATCH v2 0/4] iio: adc: xilinx: XADC driver Enhancements and bug fixes Manish Narani
2018-07-23 15:02 ` [PATCH v2 1/4] iio: adc: xilinx: Check for return values in clk related functions Manish Narani
2018-07-29 11:48 ` Jonathan Cameron
2018-07-23 15:02 ` [PATCH v2 2/4] iio: adc: xilinx: limit pcap clock frequency value Manish Narani
2018-07-29 11:51 ` Jonathan Cameron
2018-07-30 10:13 ` Manish Narani
2018-07-23 15:02 ` [PATCH v2 3/4] iio: adc: xilinx: Remove platform_get_irq from xadc_remove function Manish Narani
2018-07-29 12:29 ` Jonathan Cameron
2018-07-23 15:02 ` Manish Narani [this message]
2018-07-29 12:30 ` [PATCH v2 4/4] iio: adc: xilinx: Move request_irq before enabling interrupts Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532358123-23485-5-git-send-email-manish.narani@xilinx.com \
--to=manish.narani@xilinx.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).