aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r--drivers/misc/mei/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index c70333228337..7de13891e49e 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -982,7 +982,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
982 err = request_threaded_irq(pdev->irq, 982 err = request_threaded_irq(pdev->irq,
983 NULL, 983 NULL,
984 mei_interrupt_thread_handler, 984 mei_interrupt_thread_handler,
985 0, mei_driver_name, dev); 985 IRQF_ONESHOT, mei_driver_name, dev);
986 else 986 else
987 err = request_threaded_irq(pdev->irq, 987 err = request_threaded_irq(pdev->irq,
988 mei_interrupt_quick_handler, 988 mei_interrupt_quick_handler,
@@ -992,7 +992,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
992 if (err) { 992 if (err) {
993 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", 993 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
994 pdev->irq); 994 pdev->irq);
995 goto unmap_memory; 995 goto disable_msi;
996 } 996 }
997 INIT_DELAYED_WORK(&dev->timer_work, mei_timer); 997 INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
998 if (mei_hw_init(dev)) { 998 if (mei_hw_init(dev)) {
@@ -1023,8 +1023,8 @@ release_irq:
1023 mei_disable_interrupts(dev); 1023 mei_disable_interrupts(dev);
1024 flush_scheduled_work(); 1024 flush_scheduled_work();
1025 free_irq(pdev->irq, dev); 1025 free_irq(pdev->irq, dev);
1026disable_msi:
1026 pci_disable_msi(pdev); 1027 pci_disable_msi(pdev);
1027unmap_memory:
1028 pci_iounmap(pdev, dev->mem_addr); 1028 pci_iounmap(pdev, dev->mem_addr);
1029free_device: 1029free_device:
1030 kfree(dev); 1030 kfree(dev);
@@ -1101,6 +1101,8 @@ static void __devexit mei_remove(struct pci_dev *pdev)
1101 1101
1102 pci_release_regions(pdev); 1102 pci_release_regions(pdev);
1103 pci_disable_device(pdev); 1103 pci_disable_device(pdev);
1104
1105 misc_deregister(&mei_misc_device);
1104} 1106}
1105#ifdef CONFIG_PM 1107#ifdef CONFIG_PM
1106static int mei_pci_suspend(struct device *device) 1108static int mei_pci_suspend(struct device *device)
@@ -1216,7 +1218,6 @@ module_init(mei_init_module);
1216 */ 1218 */
1217static void __exit mei_exit_module(void) 1219static void __exit mei_exit_module(void)
1218{ 1220{
1219 misc_deregister(&mei_misc_device);
1220 pci_unregister_driver(&mei_driver); 1221 pci_unregister_driver(&mei_driver);
1221 1222
1222 pr_debug("unloaded successfully.\n"); 1223 pr_debug("unloaded successfully.\n");