diff options
author | Hans J. Koch <hjk@hansjkoch.de> | 2011-08-09 20:53:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-22 17:52:00 -0700 |
commit | 4e0b72fd7444e07e2870d193ce8fb6b0b00f5a89 (patch) | |
tree | d81946567cef8109de9e95e64bee846f5986f13d | |
parent | a406f75840e15afbabd98cb64ae36b51424a8033 (diff) | |
download | linux-4e0b72fd7444e07e2870d193ce8fb6b0b00f5a89.tar.gz linux-4e0b72fd7444e07e2870d193ce8fb6b0b00f5a89.tar.bz2 linux-4e0b72fd7444e07e2870d193ce8fb6b0b00f5a89.zip |
uio: uio_pci_generic: Remove useless spin_lock
The spin_lock in uio_pci_generic.c is only used in the interrupt
handler, which cannot be executed twice at the same time.
That makes the lock rather pointless. This patch removes it.
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Chris Wright <chrisw@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Anthony Foiani <anthony.foiani@gmail.com>
Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/uio/uio_pci_generic.c | 5 |
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 @@ #include <linux/pci.h> #include <linux/slab.h> #include <linux/uio_driver.h> -#include <linux/spinlock.h> #define DRIVER_VERSION "0.01.0" #define DRIVER_AUTHOR "Michael S. Tsirkin <mst@redhat.com>" @@ -33,7 +32,6 @@ struct uio_pci_generic_dev { struct uio_info info; struct pci_dev *pdev; - spinlock_t lock; /* guards command register accesses */ }; static inline struct uio_pci_generic_dev * @@ -57,7 +55,6 @@ static irqreturn_t irqhandler(int irq, struct uio_info *info) BUILD_BUG_ON(PCI_COMMAND % 4); BUILD_BUG_ON(PCI_COMMAND + 2 != PCI_STATUS); - spin_lock_irq(&gdev->lock); pci_block_user_cfg_access(pdev); /* 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) done: pci_unblock_user_cfg_access(pdev); - spin_unlock_irq(&gdev->lock); return ret; } @@ -158,7 +154,6 @@ static int __devinit probe(struct pci_dev *pdev, gdev->info.irq_flags = IRQF_SHARED; gdev->info.handler = irqhandler; gdev->pdev = pdev; - spin_lock_init(&gdev->lock); if (uio_register_device(&pdev->dev, &gdev->info)) goto err_register; |