diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-06-02 16:01:45 +0300 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-06-02 14:53:16 +0100 |
commit | cc1fed00c9ba84f38717a6cab84409cd48f340e3 (patch) | |
tree | d22d5c9f0ec4a4d6a83d57df04133df1f82bf7f9 /drivers/mtd/nand/r852.c | |
parent | df1f1d1cb43b4ffdef5ba5f0623e2f73e94ce030 (diff) | |
download | linux-cc1fed00c9ba84f38717a6cab84409cd48f340e3.tar.bz2 |
mtd/r852: register IRQ as last step
Otherwise, if it fires right away, it might access
uninitialized spinlock
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/r852.c')
-rw-r--r-- | 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 78a423295474..20a654a94d30 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); |