aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/uio/uio_pci_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/uio/uio_pci_generic.c')
-rw-r--r--drivers/uio/uio_pci_generic.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c
index fc22e1e6f215..02bd47bdee1c 100644
--- a/drivers/uio/uio_pci_generic.c
+++ b/drivers/uio/uio_pci_generic.c
@@ -24,7 +24,6 @@
24#include <linux/pci.h> 24#include <linux/pci.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/uio_driver.h> 26#include <linux/uio_driver.h>
27#include <linux/spinlock.h>
28 27
29#define DRIVER_VERSION "0.01.0" 28#define DRIVER_VERSION "0.01.0"
30#define DRIVER_AUTHOR "Michael S. Tsirkin <mst@redhat.com>" 29#define DRIVER_AUTHOR "Michael S. Tsirkin <mst@redhat.com>"
@@ -33,7 +32,6 @@
33struct uio_pci_generic_dev { 32struct uio_pci_generic_dev {
34 struct uio_info info; 33 struct uio_info info;
35 struct pci_dev *pdev; 34 struct pci_dev *pdev;
36 spinlock_t lock; /* guards command register accesses */
37}; 35};
38 36
39static inline struct uio_pci_generic_dev * 37static inline struct uio_pci_generic_dev *
@@ -57,7 +55,6 @@ static irqreturn_t irqhandler(int irq, struct uio_info *info)
57 BUILD_BUG_ON(PCI_COMMAND % 4); 55 BUILD_BUG_ON(PCI_COMMAND % 4);
58 BUILD_BUG_ON(PCI_COMMAND + 2 != PCI_STATUS); 56 BUILD_BUG_ON(PCI_COMMAND + 2 != PCI_STATUS);
59 57
60 spin_lock_irq(&gdev->lock);
61 pci_block_user_cfg_access(pdev); 58 pci_block_user_cfg_access(pdev);
62 59
63 /* Read both command and status registers in a single 32-bit operation. 60 /* Read both command and status registers in a single 32-bit operation.
@@ -83,7 +80,6 @@ static irqreturn_t irqhandler(int irq, struct uio_info *info)
83done: 80done:
84 81
85 pci_unblock_user_cfg_access(pdev); 82 pci_unblock_user_cfg_access(pdev);
86 spin_unlock_irq(&gdev->lock);
87 return ret; 83 return ret;
88} 84}
89 85
@@ -158,7 +154,6 @@ static int __devinit probe(struct pci_dev *pdev,
158 gdev->info.irq_flags = IRQF_SHARED; 154 gdev->info.irq_flags = IRQF_SHARED;
159 gdev->info.handler = irqhandler; 155 gdev->info.handler = irqhandler;
160 gdev->pdev = pdev; 156 gdev->pdev = pdev;
161 spin_lock_init(&gdev->lock);
162 157
163 if (uio_register_device(&pdev->dev, &gdev->info)) 158 if (uio_register_device(&pdev->dev, &gdev->info))
164 goto err_register; 159 goto err_register;