public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: linux-mtd <linux-mtd@lists.infradead.org>
Cc: dwmw2 <dwmw2@infradead.org>, Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH 1/3] r852: register IRQ as last step
Date: Sat, 22 May 2010 04:07:54 +0300	[thread overview]
Message-ID: <1274490476-16057-1-git-send-email-maximlevitsky@gmail.com> (raw)
In-Reply-To: <1274490185.15285.22.camel@maxim-laptop>

From: Maxim Levitsky <maximlevitsky@gmail.com>

Otherwise, if it fires right away, it might access
uninitialized spinlock

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/mtd/nand/r852.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index 78a4232..20a654a 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -940,18 +940,19 @@ int  r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
 
 	r852_dma_test(dev);
 
+	dev->irq = pci_dev->irq;
+	spin_lock_init(&dev->irqlock);
+
+	dev->card_detected = 0;
+	r852_card_update_present(dev);
+
 	/*register irq handler*/
 	error = -ENODEV;
 	if (request_irq(pci_dev->irq, &r852_irq, IRQF_SHARED,
 			  DRV_NAME, dev))
 		goto error10;
 
-	dev->irq = pci_dev->irq;
-	spin_lock_init(&dev->irqlock);
-
 	/* kick initial present test */
-	dev->card_detected = 0;
-	r852_card_update_present(dev);
 	queue_delayed_work(dev->card_workqueue,
 		&dev->card_detect_work, 0);
 
-- 
1.7.0.4

  reply	other threads:[~2010-05-22  1:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-22  1:03 [PATCH] [R852] Few fixes Maxim Levitsky
2010-05-22  1:07 ` Maxim Levitsky [this message]
2010-05-22  1:07 ` [PATCH 2/3] r852: Fixes in case of DMA timeout Maxim Levitsky
2010-05-22  1:07 ` [PATCH 3/3] MTD: Kconfig cleanups Maxim Levitsky
2010-05-22  7:47   ` David Woodhouse
2010-05-22  7:58     ` Maxim Levitsky
2010-05-22  8:06       ` Maxim Levitsky
2010-05-22 10:54         ` Maxim Levitsky
2010-05-22 12:18   ` [PATCH v2] MTD: Fix NAND submenu Maxim Levitsky

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=1274490476-16057-1-git-send-email-maximlevitsky@gmail.com \
    --to=maximlevitsky@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@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