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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index aaf2683ea154..0d98c2ee6fe3 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -977,7 +977,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
977 err = request_threaded_irq(pdev->irq, 977 err = request_threaded_irq(pdev->irq,
978 NULL, 978 NULL,
979 mei_interrupt_thread_handler, 979 mei_interrupt_thread_handler,
980 0, mei_driver_name, dev); 980 IRQF_ONESHOT, mei_driver_name, dev);
981 else 981 else
982 err = request_threaded_irq(pdev->irq, 982 err = request_threaded_irq(pdev->irq,
983 mei_interrupt_quick_handler, 983 mei_interrupt_quick_handler,
@@ -987,7 +987,7 @@ static int __devinit mei_probe(struct pci_dev *pdev,
987 if (err) { 987 if (err) {
988 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n", 988 dev_err(&pdev->dev, "request_threaded_irq failure. irq = %d\n",
989 pdev->irq); 989 pdev->irq);
990 goto unmap_memory; 990 goto disable_msi;
991 } 991 }
992 INIT_DELAYED_WORK(&dev->timer_work, mei_timer); 992 INIT_DELAYED_WORK(&dev->timer_work, mei_timer);
993 if (mei_hw_init(dev)) { 993 if (mei_hw_init(dev)) {
@@ -1018,8 +1018,8 @@ release_irq:
1018 mei_disable_interrupts(dev); 1018 mei_disable_interrupts(dev);
1019 flush_scheduled_work(); 1019 flush_scheduled_work();
1020 free_irq(pdev->irq, dev); 1020 free_irq(pdev->irq, dev);
1021disable_msi:
1021 pci_disable_msi(pdev); 1022 pci_disable_msi(pdev);
1022unmap_memory:
1023 pci_iounmap(pdev, dev->mem_addr); 1023 pci_iounmap(pdev, dev->mem_addr);
1024free_device: 1024free_device:
1025 kfree(dev); 1025 kfree(dev);
@@ -1096,6 +1096,8 @@ static void __devexit mei_remove(struct pci_dev *pdev)
1096 1096
1097 pci_release_regions(pdev); 1097 pci_release_regions(pdev);
1098 pci_disable_device(pdev); 1098 pci_disable_device(pdev);
1099
1100 misc_deregister(&mei_misc_device);
1099} 1101}
1100#ifdef CONFIG_PM 1102#ifdef CONFIG_PM
1101static int mei_pci_suspend(struct device *device) 1103static int mei_pci_suspend(struct device *device)
@@ -1140,7 +1142,7 @@ static int mei_pci_resume(struct device *device)
1140 err = request_threaded_irq(pdev->irq, 1142 err = request_threaded_irq(pdev->irq,
1141 NULL, 1143 NULL,
1142 mei_interrupt_thread_handler, 1144 mei_interrupt_thread_handler,
1143 0, mei_driver_name, dev); 1145 IRQF_ONESHOT, mei_driver_name, dev);
1144 else 1146 else
1145 err = request_threaded_irq(pdev->irq, 1147 err = request_threaded_irq(pdev->irq,
1146 mei_interrupt_quick_handler, 1148 mei_interrupt_quick_handler,
@@ -1211,7 +1213,6 @@ module_init(mei_init_module);
1211 */ 1213 */
1212static void __exit mei_exit_module(void) 1214static void __exit mei_exit_module(void)
1213{ 1215{
1214 misc_deregister(&mei_misc_device);
1215 pci_unregister_driver(&mei_driver); 1216 pci_unregister_driver(&mei_driver);
1216 1217
1217 pr_debug("unloaded successfully.\n"); 1218 pr_debug("unloaded successfully.\n");